Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

283
Views
How to use import maps with skypack and versions

Is there a way to use versioned skypack code with importmaps?

I am trying to import codemirror from skypack-cdn. I also want the file to work with the bundlers, like Babel, in the future. It would be very nice to avoid the excessive workflow that bundlers bring to this tiny project.

The imports in the javascript file that I would like to save from bundling looks like this

import {EditorView, basicSetup} from 'codemirror'
import {keymap} from '@codemirror/view'
import {indentWithTab} from '@codemirror/commands'
import {javascript} from '@codemirror/lang-javascript'
import {EditorState} from '@codemirror/state'

The working import map looks like this.

<script type="importmap">
      {
        "imports": {
          "codemirror" : "https://cdn.skypack.dev/codemirror/", 
          "@codemirror/" : "https://cdn.skypack.dev/@codemirror/"
        }
      }
    </script>

The problem arrises when I try to pin Codemirror to a specific version like so

<script type="importmap">
      {
        "imports": {
          "codemirror" : "https://cdn.skypack.dev/codemirror@6.0.0/", 
          "@codemirror/" : "https://cdn.skypack.dev/@codemirror@6.0.0/"
        }
      }
    </script>

The URL https://cdn.skypack.dev/@codemirror@6.0.0/commands does not exist. The correct place to look would be https://cdn.skypack.dev/@codemirror/commands@6.0.0

Is there anyway to pin this to a particular version using the import maps?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!