File tree 1 file changed +8
-1
lines changed
packages/babel-preset-react-app
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -92,7 +92,14 @@ module.exports = function(api, opts) {
92
92
// don't work without it: https://github.com/babel/babel/issues/7215
93
93
require ( '@babel/plugin-transform-destructuring' ) . default ,
94
94
// class { handleClick = () => { } }
95
- require ( '@babel/plugin-proposal-class-properties' ) . default ,
95
+ // Enable loose mode to use assignment instead of defineProperty
96
+ // See discussion in https://github.com/facebook/create-react-app/issues/4263
97
+ [
98
+ require ( '@babel/plugin-proposal-class-properties' ) . default ,
99
+ {
100
+ loose : true ,
101
+ } ,
102
+ ] ,
96
103
// The following two plugins use Object.assign directly, instead of Babel's
97
104
// extends helper. Note that this assumes `Object.assign` is available.
98
105
// { ...todo, completed: true }
You can’t perform that action at this time.
0 commit comments