babel-polyfill - error Error: only one instance of babel-polyfill is allowed
See original GitHub issueI’m submitting a bug report
Webpack Version: 1.14.0
Babel Core Version: 6.23.1
Babel Loader Version: 6.3.2
Please tell us about your environment: Windows 10
Current behavior: I try to use babel-polyfill for ie11 with webpack
entry: {
app: ['babel-polyfill','./src/main.js']
}
After ie11 reconize Array.includes but in some pages i have error in other browsers like Firefox
error Error: only one instance of babel-polyfill is allowed
Issue Analytics
- State:
- Created 7 years ago
- Reactions:13
- Comments:25 (4 by maintainers)
Top Results From Across the Web
"Only one instance of babel-polyfill is allowed" error
Looks like the culprit is HtmlWebpackPlugin in my webpack config. If I remove this plugin, I the error goes away. · try changing...
Read more >Uncaught Error: only one instance of babel-polyfill is allowed
On a site with a theme that uses webpack and babel (with no issue), once Oasis Workflow is activated an error is thrown...
Read more >Error: only one instance of babel-polyfill is allowed
After adding genomelink node module to my app and I have this error. Please recommend a way to fix this.
Read more >only-one-instance-of-babel-polyfill-allowed-error
VS Code's tsserver was deleted by another application such as a misbehaving virus detection tool. Please reinstall VS Code. Manage Extension.
Read more >Only one instance of babel-polyfill is allowed" error-Reactjs
[Solved]-"Only one instance of babel-polyfill is allowed" error-Reactjs ... I had the same issue and I get rid of the error by removing...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
There was another 3rd party library which included the
babel-polyfill
in their bundle. To fix this I had to remove thebabel-polyfill
from the entry inwebpack.config
and add a conditional require to the top of myindex.js
which is the entry point.Before webpack.config:
After webpack.config:
Added to the top of ./src/index.js:
Now everything works without issue.
I was also seeing this error, but after checking my html, I was also including my bundled JS twice. Fixed by updating my HTML to ensure I only include my bundle once