File tree 2 files changed +11
-1
lines changed
packages/babel-preset-react-app
2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,15 @@ const plugins = [
27
27
regenerator : true ,
28
28
// Resolve the Babel runtime relative to the config.
29
29
moduleName : path . dirname ( require . resolve ( 'babel-runtime/package' ) )
30
- } ]
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' )
31
39
] ;
32
40
33
41
// This is similar to how `env` works in Babel:
Original file line number Diff line number Diff line change 12
12
],
13
13
"dependencies" : {
14
14
"babel-plugin-transform-class-properties" : " 6.11.5" ,
15
+ "babel-plugin-transform-es2015-destructuring" : " 6.16.0" ,
16
+ "babel-plugin-transform-es2015-parameters" : " 6.17.0" ,
15
17
"babel-plugin-transform-object-rest-spread" : " 6.8.0" ,
16
18
"babel-plugin-transform-react-constant-elements" : " 6.9.1" ,
17
19
"babel-plugin-transform-react-jsx-self" : " 6.11.0" ,
You can’t perform that action at this time.
0 commit comments