jspm / jspm-cli

ES Module Package Manager
https://jspm.org
Apache License 2.0
3.79k stars 272 forks source link

HTML linking case importmap input #2575

Closed guybedford closed 3 months ago

guybedford commented 4 months ago

I just tried linking the following HTML:

<!doctype html>
<script type="importmap">
{
  "imports": {
    "lit": "https://cdn.jsdelivr.net/gh/lit/dist@3.1.4/core/lit-core.min.js"
  }
}
</script>
<script type="module" src="./app.js"></script>
<body>
  <simple-greeting name="World"></simple-greeting>
</body>

but when I do:

jspm link app.html -o app.html --integrity

it changes the mappings to use jspm.io instead.

Instead I need to write:

jspm link app.html --map app.html -o app.html --integrity

to build integrity against the existing import map.

In the case where there is no importmap.json file, we should default to taking the import map from the provided app.html link input.

guybedford commented 3 months ago

Resolved in #2577.