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 committed Mar 7, 2017
1 parent aa434d5 commit 0811775
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
12 changes: 11 additions & 1 deletion packages/babel-preset-react-app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,17 @@ if (env === 'test') {
module.exports = {
presets: [
// Latest stable ECMAScript features
require.resolve('babel-preset-latest'),
[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
3 changes: 1 addition & 2 deletions packages/babel-preset-react-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
"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-env": "1.2.1",
"babel-preset-react": "6.22.0",
"babel-runtime": "6.22.0"
}
Expand Down

0 comments on commit 0811775

Please sign in to comment.