Skip to content

Commit 256d705

Browse files
committed
Switch to preset-env
Disables webpack modules by enabling babel modules to resolve #1638
1 parent 1bfd5da commit 256d705

File tree

2 files changed

+15
-13
lines changed

2 files changed

+15
-13
lines changed

packages/babel-preset-react-app/index.js

+7-4
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,13 @@ if (env === 'test') {
8484
module.exports = {
8585
presets: [
8686
// Latest stable ECMAScript features
87-
[require.resolve('babel-preset-latest'), {
88-
'es2015': {
89-
modules: false
90-
}
87+
[require.resolve('babel-preset-env'), {
88+
targets: {
89+
// We support everything React supports
90+
'ie': 9
91+
},
92+
// Disable polyfill transforms
93+
useBuiltIns: false
9194
}],
9295
// JSX, Flow
9396
require.resolve('babel-preset-react')

packages/babel-preset-react-app/package.json

+8-9
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,16 @@
1313
"dependencies": {
1414
"babel-plugin-dynamic-import-node": "1.0.0",
1515
"babel-plugin-syntax-dynamic-import": "6.18.0",
16-
"babel-plugin-transform-class-properties": "6.22.0",
17-
"babel-plugin-transform-object-rest-spread": "6.22.0",
18-
"babel-plugin-transform-react-constant-elements": "6.22.0",
19-
"babel-plugin-transform-react-jsx": "6.22.0",
16+
"babel-plugin-transform-class-properties": "6.23.0",
17+
"babel-plugin-transform-object-rest-spread": "6.23.0",
18+
"babel-plugin-transform-react-constant-elements": "6.23.0",
19+
"babel-plugin-transform-react-jsx": "6.23.0",
2020
"babel-plugin-transform-react-jsx-self": "6.22.0",
2121
"babel-plugin-transform-react-jsx-source": "6.22.0",
2222
"babel-plugin-transform-regenerator": "6.22.0",
23-
"babel-plugin-transform-runtime": "6.22.0",
24-
"babel-preset-env": "1.1.8",
25-
"babel-preset-latest": "6.22.0",
26-
"babel-preset-react": "6.22.0",
27-
"babel-runtime": "6.22.0"
23+
"babel-plugin-transform-runtime": "6.23.0",
24+
"babel-preset-env": "1.2.1",
25+
"babel-preset-react": "6.23.0",
26+
"babel-runtime": "6.23.0"
2827
}
2928
}

0 commit comments

Comments
 (0)