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
Expose importer path to dynamicImportFunction #3444
Comments
See GoogleChromeLabs/dynamic-import-polyfill#8 why this is necessary for polyfills. |
I see your point, but I am still undecided. Another approach I am considering is to add a new |
Here is the My preference would be to go with this hook and otherwise deprecate the |
Deprecating |
Feature Use Case
Native dynamic imports resolve paths relative to the importing module. When implementing a dynamic import polyfill, it would be ideal to implement the same logic.
Feature Proposal
When using
dynamicImportFunction
, only the imported module path is exposed. It would be great if the importing module URL could be exposed as well.So instead of:
Do:
A dynamic import polyfill could then resolve the URL somewhat like this:
The text was updated successfully, but these errors were encountered: