After updating to the babel modules version 7.7.0 published on 11/05/19, babel-plugin-minify-simplify/lib/index.js:549:40 is now failing with Cannot set property inList of [object Object] which has only a getter.
This is pulled in by babel-preset-minify 0.4.3. It's used to minify React code.
{ TypeError: ./test.js: Cannot set property inList of [object Object] which has only a getter
at PluginPass.exit (./node_modules/babel-plugin-minify-simplify/lib/index.js:549:40)
at newFn (./node_modules/@babel/traverse/lib/visitors.js:179:21)
at NodePath._call (./node_modules/@babel/traverse/lib/path/context.js:55:20)
at NodePath.call (./node_modules/@babel/traverse/lib/path/context.js:42:17)
at NodePath.visit (./node_modules/@babel/traverse/lib/path/context.js:99:8)
at TraversalContext.visitQueue (./node_modules/@babel/traverse/lib/context.js:112:16)
at TraversalContext.visitSingle (./node_modules/@babel/traverse/lib/context.js:84:19)
at TraversalContext.visit (./node_modules/@babel/traverse/lib/context.js:140:19)
at Function.traverse.node (./node_modules/@babel/traverse/lib/index.js:84:17)
at NodePath.visit (./node_modules/@babel/traverse/lib/path/context.js:97:18) code: 'BABEL_TRANSFORM_ERROR' }
Describe the bug
After updating to the babel modules version 7.7.0 published on 11/05/19,
babel-plugin-minify-simplify/lib/index.js:549:40
is now failing withCannot set property inList of [object Object] which has only a getter
.This is pulled in by
babel-preset-minify
0.4.3. It's used to minify React code.To Reproduce
Minimal code to reproduce the bug
package.json
.babelrc.js
:test.js
command:
npx babel test.js
Actual Output
Error thrown
Expected Output
No error thrown
Stack Trace
Configuration
How are you using babel-minify?
babel-minify CLI
babel-minify version:
0.4.3
babel version :
@babel/core@7.7.0
babel-minify-config:
babelrc:
Possible solution
Additional context