mjackson / unpkg

The CDN for everything on npm
https://unpkg.com
Other
3k stars 302 forks source link

[?module] dynamic imports using ` throws error #253

Open daKmoR opened 4 years ago

daKmoR commented 4 years ago

Imports using a ` instead of " or ' will throw an error

example:

import(`./something.js`);

Error thrown:

TypeError: Cannot read property 'replace' of undefined
dasa commented 4 years ago

I've run into this also, but I'm not clear on the status of this issue?

dasa commented 4 years ago

My case is actually a little different, but results in the same error.

This uses import(n): https://unpkg.com/@arcgis/core@4.17.0-next.20200916/core/workers/workers.js

Error for: https://unpkg.com/@arcgis/core@4.17.0-next.20200916/core/workers/workers.js?module

Cannot generate module for @arcgis/core@4.17.0-next.20200916/core/workers/workers.js

TypeError: Cannot read property 'replace' of undefined

undefined