-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Parcel does not add polyfill for Object.assign when using @babel/preset-env with useBuiltIns: 'usage' #2262
Comments
Some debug information: When only processed with babel, |
this seems related to #2304, the bundler doesn't seem to be applying the configuration in a recursive / deep manner |
I'm having the same issue, and it looks like regardless of what you set in the .babelrc, it is being changed to 'entry', here: I tried changing that line from 'entry' to 'usage', and it worked. It might need a PR to make this actually respect the configuration... |
nice catch @tjwlucas it seems that a lot of stuff are hardcoded irrespective of babelrc |
Sounds like this will be solved in Parcel 2 by #2350 |
indeed, it looks like it will fix those dangling issues with configs being ignored / overridden |
what will be the workaround for 1.11.0? |
@mallim there's none, you need to fork the project, fix the code, then use your fork git address as the "version" field in npm (did this with two ES7+ projects) |
use parcel-bundler@1.9.7 stable version |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. |
🐛 bug report
I was trying to use Parcel together with @babel/preset-env to create a bundle to run on ie 11. In my source code I had a call to Object.assign. After build the code fails running on ie with the following mesage
Object doesn't support property or method 'assign'
.I have created a repo for reproducing the bug here: https://github.com/slowselfip/object-assign-ie11-polyfill-parcel
🎛 Configuration (.babelrc, package.json, cli command)
.babelrc
package.json
🤔 Expected Behavior
I expect it to run on ie 11 with a polyfilled Object.assign.
😯 Current Behavior
Code fails running on ie with the following mesage
Object doesn't support property or method 'assign'
💁 Possible Solution
No idea, sorry.
🔦 Context
For convenience It would be nice to be able to rely on the useBuiltIn without the need of manually adding polyfills. Also, my hopes is that this helps in fixing the bug.
💻 Code Sample
https://github.com/slowselfip/object-assign-ie11-polyfill-parcel
🌍 Your Environment
Mac
The text was updated successfully, but these errors were encountered: