Skip to content

Commit 7554d30

Browse files
committed
Remove unnecessary babel transform plugins from babel-preset-react-app
The `babel-plugin-transform-object-rest-spread` v6.19.0 update makes these plugins unnecessary, as v6.19.0 can be used stand-alone
1 parent 378df6a commit 7554d30

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

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

+1-9
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,7 @@ const plugins = [
2727
regenerator: true,
2828
// Resolve the Babel runtime relative to the config.
2929
moduleName: path.dirname(require.resolve('babel-runtime/package'))
30-
}],
31-
// The following two plugins are currently necessary to get
32-
// babel-preset-env to work with rest/spread. More info here:
33-
// https://github.com/babel/babel-preset-env#caveats
34-
// https://github.com/babel/babel/issues/4074
35-
// const { a, ...z } = obj;
36-
require.resolve('babel-plugin-transform-es2015-destructuring'),
37-
// const fn = ({ a, ...otherProps }) => otherProps;
38-
require.resolve('babel-plugin-transform-es2015-parameters')
30+
}]
3931
];
4032

4133
// This is similar to how `env` works in Babel:

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

-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
],
1313
"dependencies": {
1414
"babel-plugin-transform-class-properties": "6.16.0",
15-
"babel-plugin-transform-es2015-destructuring": "6.16.0",
16-
"babel-plugin-transform-es2015-parameters": "6.17.0",
1715
"babel-plugin-transform-object-rest-spread": "6.19.0",
1816
"babel-plugin-transform-react-constant-elements": "6.9.1",
1917
"babel-plugin-transform-react-jsx-self": "6.11.0",

0 commit comments

Comments
 (0)