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
babel transfrom runtime incompatible with url loader #10561
Comments
Hey @samMeow! We really appreciate you taking the time to report an issue. The collaborators on this project attempt to help as many people as possible, but we're a limited number of volunteers, so it's possible this won't be addressed swiftly. If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack community that typically always has someone willing to help. You can sign-up here for an invite." |
If you are using webpack you shouldn't transpile modules: it will just lead to a less optimized output. But yes, that last if should be |
Thanks for quick response. If the direction is to only cache objects, we can simply return at the top? |
Yeah, but it should return |
Why? It seems to me, that it shall return a clone of the object, with additional |
* fix: [#10561] _interopRequireWildcard should cache object only * fix: narrow down cache restriction to object/function type * test: add interop require null module case
Bug Report
Current Behavior
Babel dynamic import
_interopRequireWildcard
function fail if imported obj/ modules is pure string (e.g. base64 encoded image), because cache (WeakMap) doesn't accept string as key (only accept object).Input Code
Ref: #10161
Expected behavior/code
_interopRequireWildcard
should take care string module (url-loader/file-loader) also.Environment
Possible Solution
Consider a different cache mechanism (e.g. Map/ no cache for string)
The text was updated successfully, but these errors were encountered: