jspm / generator

JSPM Import Map Generator
Apache License 2.0
160 stars 20 forks source link

Uncaught SyntaxError: Unexpected token 'export' (at es-module-shims.js:2:1) #353

Closed schlichtanders closed 1 month ago

schlichtanders commented 3 months ago

The automatically inserted import of es-module-shims (inserted when using jspm link)

<script async src="https://esm.sh/*es-module-shims@1.8.3/dist/es-module-shims.js" crossorigin="anonymous"></script>

leads to an error in brave (chrome-based)

Uncaught SyntaxError: Unexpected token 'export' (at es-module-shims.js:2:1)

(EDIT: when adding the type="module" manually, I get another error An import map is added after module script load was triggered.)

guybedford commented 3 months ago

I've transferred this issue to the generator.jspm.io issue queue, the problem is that that esm.sh requires a separate URL system for referencing es-module-shims here.

In the mean time, you can manually update the URL to https://esm.sh/v135/es-module-shims@1.8.3/es2022/dist/es-module-shims.js.