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
Subsequent dynamic import of the same external module result in erroneous substitution of resolution namespace #2487
Comments
Sidebar: Is there any way to simply disable everything to do with rollup's treatment of dynamic imports and just leave them as-is? Have been poking at this from lots of angles but am failing to get it to do that. |
Are you using experimentalCodeSplitting? Inlining of dynamic imports is the default if this option is not used, which is what you observed here. The rest needs further investigation. Switching off the handling of dynamic imports is not really possible at the moment but there is a poorly documented plugin hook that may help you: |
For now I am able to avoid this particular problem using Rollup 0.64.1 I played with resolveDynamicImport but I didn't seem to be able to avoid this behavior when using it. |
Fix for the first issue at #2505. As for the second issue, see my comment above. |
How Do We Reproduce?
Consider the following files:
I don't want rollup to inline any of the dynamically imported components, so I provide the fully resolved path to them in my as external option:
Expected Behavior
Actual Behavior
The first instance of the dynamic import of
some-module.js
leaks the local path name in the rolled up result. I think this called out by #2481However, the second instance of the dynamic import of
some-module.js
is replaced with a promise returning the resolution namespace ofapp
which is totally bogus.💔
The text was updated successfully, but these errors were encountered: