Skip to content

Commit

Permalink
Switch to preset-env (#1742)
Browse files Browse the repository at this point in the history
* Switch to preset-env
Disables webpack modules by enabling babel modules to resolve #1638

* Bump babel-core to match babel preset versions

* Add uglify to targets
  • Loading branch information
Timer authored Mar 7, 2017
1 parent cc35b8e commit 24f38f8
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 14 deletions.
14 changes: 10 additions & 4 deletions packages/babel-preset-react-app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,16 @@ if (env === 'test') {
module.exports = {
presets: [
// Latest stable ECMAScript features
[require.resolve('babel-preset-latest'), {
'es2015': {
modules: false
}
[require.resolve('babel-preset-env'), {
targets: {
// React parses on ie 9, so we should too
ie: 9,
// We currently minify with uglify
// Remove after https://github.com/mishoo/UglifyJS2/issues/448
uglify: true
},
// Disable polyfill transforms
useBuiltIns: false
}],
// JSX, Flow
require.resolve('babel-preset-react')
Expand Down
17 changes: 8 additions & 9 deletions packages/babel-preset-react-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,16 @@
"dependencies": {
"babel-plugin-dynamic-import-node": "1.0.0",
"babel-plugin-syntax-dynamic-import": "6.18.0",
"babel-plugin-transform-class-properties": "6.22.0",
"babel-plugin-transform-object-rest-spread": "6.22.0",
"babel-plugin-transform-react-constant-elements": "6.22.0",
"babel-plugin-transform-react-jsx": "6.22.0",
"babel-plugin-transform-class-properties": "6.23.0",
"babel-plugin-transform-object-rest-spread": "6.23.0",
"babel-plugin-transform-react-constant-elements": "6.23.0",
"babel-plugin-transform-react-jsx": "6.23.0",
"babel-plugin-transform-react-jsx-self": "6.22.0",
"babel-plugin-transform-react-jsx-source": "6.22.0",
"babel-plugin-transform-regenerator": "6.22.0",
"babel-plugin-transform-runtime": "6.22.0",
"babel-preset-env": "1.1.8",
"babel-preset-latest": "6.22.0",
"babel-preset-react": "6.22.0",
"babel-runtime": "6.22.0"
"babel-plugin-transform-runtime": "6.23.0",
"babel-preset-env": "1.2.1",
"babel-preset-react": "6.23.0",
"babel-runtime": "6.23.0"
}
}
2 changes: 1 addition & 1 deletion packages/react-scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
},
"dependencies": {
"autoprefixer": "6.7.5",
"babel-core": "6.22.1",
"babel-core": "6.23.1",
"babel-eslint": "7.1.1",
"babel-jest": "18.0.0",
"babel-loader": "6.3.2",
Expand Down

0 comments on commit 24f38f8

Please sign in to comment.