Update babel-preset to use babel 7
See original GitHub issueCurrently an new generated react-native project uses babel @ version 6 for transpiling the source files.
Since babel is close to releasing version 7 it would make sense to update the setup (including babel-preset-react-native
).
Environment
Environment:
OS: macOS Sierra 10.12.6
Node: 8.9.4
Yarn: 1.3.2
npm: 5.6.0
Watchman: Not Found
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: 3.0 AI-171.4443003
Packages: (wanted => installed)
react: 16.3.0-alpha.1 => 16.3.0-alpha.1
react-native: 0.54.0 => 0.54.0
Expected Behavior
Updating to babel 7 is possible.
Actual Behavior
babel-preset-react-native is incompatible with babel7.
Steps to Reproduce
Create a new project with react-native init
. Upgrade to babel 7 (yarn install -D -E @babel/core babel-core@7.0.0-bridge.0
)
Run the bundle script: yarn react-native bundle --entry-file index.js --bundle-output lel.js
Issue Analytics
- State:
- Created 6 years ago
- Reactions:4
- Comments:14 (7 by maintainers)
Top Results From Across the Web
Upgrade to Babel 7
Upgrade to Babel 7 · All of Babel · Config Lookup Changes · Yearly Preset Deprecations · Stage Preset Deprecations · Remove proposal...
Read more >How to upgrade to babel 7 - Stack Overflow
Most of the packages in Babel has been renamed to follow the pattern @babel/PACKAGE_NAME . So if you want to upgrade, change the...
Read more >BabelJS - Project setup using Babel 7 - Tutorialspoint
BabelJS - Project setup using Babel 7, The latest version of Babel, 7 released with changes to the already existing packages. The installation...
Read more >Babel upgrade from babel 6.x to 7.0 | by maicmi - Medium
And the most important step, you should edit “.babelrc” file. In babel 7.0, there is no more “preset-stage-0”. You will add “plugins” to...
Read more >npx babel-upgrade - GitHub
A tool that tries to automatically update most dependencies, config files, and JavaScript files that require Babel packages directly to Babel 7 (and...
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
It’s still being worked on. We hit some snags, which reminded me that posting ETAs is not a good idea. So, look for it “soon” 😉
https://github.com/facebook/react-native/commit/f8d6b97140cffe8d18b2558f94570c8d1b410d5c