Skip to content

Commit 2087a17

Browse files
clemmyTimer
authored andcommitted
Switch to Babel 7 (facebook#3522)
* Update dependencies in react-scripts * Add first pass of working dependencies for babel-preset-react-app and react-scripts * Bump more dependency versions * Adjust more versions and edit fix options * Restore functionality of old preset * Disable Uglify in iframe webpack * Apply prettier * Re-enable cache in dev and clean deps * Lock packages and move babel/core to dep in preset * Bump babel-jest * Re-enable uglify * Nest forceAllTransforms correctly in webpack config * Install babel-core bridge for jest * Add jest-cli and babel-core bridge to make tests in react-error-overlay pass * Re-enable transform-dynamic-import * Add dynamic import syntax support back * Use new babel in kitchensink * Transform modules in test * Revert "Transform modules in test" This reverts commit 539e46a. * Attempt fix for ejected tests * try this * Add regenerator back * Bump babel deps to beta.34 * Remove bad files * Use default when requiring babel transform plugin * Bump deps * Try the fix? * Oopsie * Remove some weird things * Run Babel on react-error-overlay tests * Try fixing kitchensink * Use new API for codeFrame * Add missing (?) babelrc * Maybe this helps? * Maybe fix mocha * I shouldn't have deleted this 🤦
1 parent bada5bc commit 2087a17

File tree

5 files changed

+14
-17
lines changed

5 files changed

+14
-17
lines changed

config/webpack.config.dev.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@ module.exports = {
9696
// Resolve Babel runtime relative to react-scripts.
9797
// It usually still works on npm 3 without this but it would be
9898
// unfortunate to rely on, as react-scripts could be symlinked,
99-
// and thus babel-runtime might not be resolvable from the source.
100-
'babel-runtime': path.dirname(
101-
require.resolve('babel-runtime/package.json')
99+
// and thus @babel/runtime might not be resolvable from the source.
100+
'@babel/runtime': path.dirname(
101+
require.resolve('@babel/runtime/package.json')
102102
),
103103
// @remove-on-eject-end
104104
// Support React Native Web

config/webpack.config.prod.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@ module.exports = {
103103
// Resolve Babel runtime relative to react-scripts.
104104
// It usually still works on npm 3 without this but it would be
105105
// unfortunate to rely on, as react-scripts could be symlinked,
106-
// and thus babel-runtime might not be resolvable from the source.
107-
'babel-runtime': path.dirname(
108-
require.resolve('babel-runtime/package.json')
106+
// and thus @babel/runtime might not be resolvable from the source.
107+
'@babel/runtime': path.dirname(
108+
require.resolve('@babel/runtime/package.json')
109109
),
110110
// @remove-on-eject-end
111111
// Support React Native Web

fixtures/kitchensink/.babelrc

-4
This file was deleted.

fixtures/kitchensink/.template.dependencies.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"dependencies": {
3-
"babel-register": "6.22.0",
4-
"babel-plugin-transform-es2015-modules-commonjs": "6.22.0",
5-
"babel-polyfill": "6.20.0",
3+
"@babel/plugin-transform-modules-commonjs": "7.0.0-beta.36",
4+
"@babel/polyfill": "7.0.0-beta.36",
5+
"@babel/register": "7.0.0-beta.36",
66
"chai": "3.5.0",
77
"jsdom": "9.8.3",
88
"mocha": "3.2.0",

package.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,14 @@
2121
"react-scripts": "./bin/react-scripts.js"
2222
},
2323
"dependencies": {
24+
"@babel/core": "7.0.0-beta.36",
25+
"@babel/runtime": "7.0.0-beta.36",
2426
"autoprefixer": "7.1.6",
25-
"babel-core": "6.26.0",
26-
"babel-eslint": "7.2.3",
27+
"babel-core": "7.0.0-bridge.0",
28+
"babel-eslint": "8.0.2",
2729
"babel-jest": "22.0.6",
28-
"babel-loader": "7.1.2",
30+
"babel-loader": "8.0.0-beta.0",
2931
"babel-preset-react-app": "^3.1.1",
30-
"babel-runtime": "6.26.0",
3132
"case-sensitive-paths-webpack-plugin": "2.1.1",
3233
"chalk": "1.1.3",
3334
"css-loader": "0.28.7",

0 commit comments

Comments
 (0)