jspm / generator.jspm.io

8 stars 6 forks source link

import map generator, with esm.sh, tries to load es-module-shims as an ES Module without type="module" #36

Closed trusktr closed 8 months ago

trusktr commented 9 months ago

generator link

This:

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

tries to load this file:

https://esm.sh/*es-module-shims@1.8.0/dist/es-module-shims.js

/* esm.sh - es-module-shims@1.8.0/dist/es-module-shims */
export * from "/v133/es-module-shims@1.8.0/X-ZS8q/es2022/dist/es-module-shims.js";
export { default } from "/v133/es-module-shims@1.8.0/X-ZS8q/es2022/dist/es-module-shims.js";

which happens to be a module, resulting in

Uncaught SyntaxError: Unexpected token 'export'
guybedford commented 8 months ago

Fixed in https://github.com/jspm/generator.jspm.io/pull/37.