Skip to content

Commit

Permalink
Remove unnecessary babel transform plugins from babel-preset-react-app
Browse files Browse the repository at this point in the history
The `babel-plugin-transform-class-properties` v6.19.0 update makes these
plugins unnecessary, as v6.19.0 can be used stand-alone
  • Loading branch information
valscion committed Nov 17, 2016
1 parent bb18897 commit a6bfed2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
10 changes: 1 addition & 9 deletions packages/babel-preset-react-app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,7 @@ const plugins = [
regenerator: true,
// Resolve the Babel runtime relative to the config.
moduleName: path.dirname(require.resolve('babel-runtime/package'))
}],
// The following two plugins are currently necessary to get
// babel-preset-env to work with rest/spread. More info here:
// https://github.com/babel/babel-preset-env#caveats
// https://github.com/babel/babel/issues/4074
// const { a, ...z } = obj;
require.resolve('babel-plugin-transform-es2015-destructuring'),
// const fn = ({ a, ...otherProps }) => otherProps;
require.resolve('babel-plugin-transform-es2015-parameters')
}]
];

// This is similar to how `env` works in Babel:
Expand Down
2 changes: 0 additions & 2 deletions packages/babel-preset-react-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
],
"dependencies": {
"babel-plugin-transform-class-properties": "6.19.0",
"babel-plugin-transform-es2015-destructuring": "6.16.0",
"babel-plugin-transform-es2015-parameters": "6.17.0",
"babel-plugin-transform-object-rest-spread": "6.16.0",
"babel-plugin-transform-react-constant-elements": "6.9.1",
"babel-plugin-transform-react-jsx-self": "6.11.0",
Expand Down

0 comments on commit a6bfed2

Please sign in to comment.