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
iterableToArray transitive usages not polyfilled #10625
Comments
Hey @RobHannay! 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 aren't passing a file to Babel (you are excluding it in your webpack config with I usually suggest transforming the specific node_module with Babel, but since I suggest aliasing |
For load both dependencies - |
When you use The latter implementation of the babel runtime does not safe-guard any of its code, by importing So, I'd say that this is not a bug, but by design. If you want to include a version of the babel runtime which is safe for operation in certain browsers, you'll have to include one of the alternative provided builds: Unfortunately, any of the mentioned builds end up depending and delegating on |
Another option is to transpile
Btw, I will look into how making it safer to transpile |
It's now safe to transpile `@babel/runtime}. |
Bug Report
Current Behavior
When spreading a new Set with core-js 'usage', transitive dependencies are not polyfilled which breaks IE11.
We saw this live when it was not polyfilling 'Array.from', but on this repro it fails earlier because Symbol is also not polyfilled.
If Symbol is added manually it then fails saying it's not an iterable instance, but works fine on Chrome/FF.
Also if you use
Array.from(new Set([]));
it works fine.Input Code
Access the Webpack dev server on Internet Explorer and see console errors.
https://babel-corejs-reproduce-set-spread.robhannay.repl.co
Code
https://repl.it/@robhannay/babel-corejs-reproduce-set-spread
Expected behavior/code
Expected the Symbol (or Array.from) 'usage' to be detected from within the iterableToArray method and itself be polyfilled
Babel Configuration (.babelrc, package.json, cli command)
Environment
Additional context/Screenshots
The text was updated successfully, but these errors were encountered: