Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import polyfillImport() from a module? #20

Open
eight04 opened this issue Feb 10, 2022 · 1 comment
Open

Import polyfillImport() from a module? #20

eight04 opened this issue Feb 10, 2022 · 1 comment

Comments

@eight04
Copy link
Owner

eight04 commented Feb 10, 2022

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?

@eight04
Copy link
Owner Author

eight04 commented Feb 11, 2022

See also rollup/rollup#3595

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant