Import polyfillImport() from a module?
eight04 opened this issue · comments
Currently, dynamicImport
is just a global variable name. Users have to prepare an external global helper outside of the bundle. Is it possible to build the helper into the bundle? For example:
import("./foo.js").then(console.log);
transform
import _import_polyfill_ from "myImportPolyfill";
_import_polyfill_("./foo.js", import.meta.url).then(console.log);
And emit the chunk. Maybe there is already a plugin out there?
See also rollup/rollup#3595