File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
packages/babel-preset-react-app Expand file tree Collapse file tree 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) {
9292 // don't work without it: https://github.com/babel/babel/issues/7215
9393 require ( '@babel/plugin-transform-destructuring' ) . default ,
9494 // 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+ ] ,
96103 // The following two plugins use Object.assign directly, instead of Babel's
97104 // extends helper. Note that this assumes `Object.assign` is available.
98105 // { ...todo, completed: true }
You can’t perform that action at this time.
0 commit comments