jspm / generator

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

Error: Module not found: https://cdn.jsdelivr.net/npm/dayjs@1.11.11/locale/en #355

Closed colinmollenhour closed 1 month ago

colinmollenhour commented 1 month ago

This error was generated on generator.jspm.io by adding the dependency "@cubejs-client/core". It works when jspm.io is the CDN but not for jsdelivr. However, jsdelivr does host the file using the .js extension here: https://cdn.jsdelivr.net/npm/dayjs@1.11.11/locale/en.js

Error: Module not found: https://cdn.jsdelivr.net/npm/dayjs@1.11.11/locale/en imported from https://cdn.jsdelivr.net/npm/@cubejs-client/core@0.35.23/dist/cubejs-client-core.esm.js
guybedford commented 1 month ago

I've transferred this issue to the generator repo as an enhancement for supporting extension searching for exports paths that fail their original request.

CommonJS supports this pattern in Node.js, so it seems a sensible pattern to support in the name of compatibility.

guybedford commented 1 month ago

Fixed in https://github.com/jspm/generator/pull/359, will aim to post a generator release this week.

colinmollenhour commented 4 weeks ago

Thanks @guybedford !