Comments (4)
This happens because you had the syntax-dynamic-import
plugin duplicated (once in the preset and once explicitly in your config).
If anyone wants to look at this issue, it's because we "eject" the stage presets by replacing them with the plugins that they enable, without checking if those plugins are already there.
from babel-upgrade.
What was your full original .babelrc
?
from babel-upgrade.
Here it is.
{
'presets': [
['env', {
"targets": {
"browsers": ["ie >= 11"]
},
"modules": false
}],
'stage-0',
'react'
],
'plugins': [
'syntax-dynamic-import'
]
}
from babel-upgrade.
Not sure if this is the same issue, but I just ran npx babel-upgrade --write --install
and almost everything worked fine, except for the following:
input
...
"presets": [
[
"es2015",
{
"modules": false
}
],
[
"env",
{
"modules": false
}
]
],
...
output
...
"presets": [
[
"@babel/preset-env",
{
"modules": false
}
],
[
"@babel/preset-env",
{
"modules": false
}
]
],
...
As I ponder it, it may be that the input was suboptimal (Babel & the various stage configs sometimes seems like black magic to me), but it worked, and afterward, it didn't. Removing the duplicate entry fixed the problem and everything started working again.
Thank you for this utility! I spent 4 hours trying to upgrade manually this morning w/ no luck. I started over and, aside from this hiccup, this utility did the job in a few minutes.
from babel-upgrade.
Related Issues (20)
- plugins aren't added to package.json
- [Ignore]
- SUGGESTION: Modify useBuiltIns for babel-preset-env in babelrc
- Plugins order are incorrect: proposal-decorators compatibility with proposal-class-properties
- Packages are capped at ^7.0.0 HOT 3
- add help
- Jest 24 dropped support for babel 6
- Upgrade failed
- "Move this into the monorepo when somewhat ready"
- Export package.json dependencies and .babelrc from repl
- @babel/core was added twice into package.json HOT 2
- cannot find module babel-plugin-transform-object-rest-spread HOT 1
- After upgrade to Babel7, I see Cannot find module '@babel/runtime-corejs2/core-js/reflect/construct' HOT 1
- Resolve duplicate entries HOT 2
- error on transform-export-extensions plugin upgrade
- Not have support to babel-plugin-transform-decorators-legacy HOT 1
- [ Bug ] Wrong behavior with unknown parameters HOT 1
- babel-upgrade is broken if you have spaces in user folder.
- ERROR in multi babel-polyfill ./src/client/index Module not found: Error: Can't resolve 'babel' in 'C:\Users\messi\New folder' @ multi babel-polyfill ./src/client/index main[1] HOT 2
- Babel Upgrade Online HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from babel-upgrade.