question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Update babel-preset to use babel 7

See original GitHub issue

Currently 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:closed
  • Created 6 years ago
  • Reactions:4
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

9reactions
hramoscommented, Mar 21, 2018

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” 😉

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found