You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/home/coder/project/fix-babel/node_modules/@babel/core/lib/transformation/index.js:45
throw e;
^
TypeError: unknown: Cannot read properties of undefined (reading 'add')
at ScopeTracker.addReference (/home/coder/project/fix-babel/node_modules/babel-plugin-minify-mangle-names/lib/scope-tracker.js:47:34)
at ReferencedIdentifier (/home/coder/project/fix-babel/node_modules/babel-plugin-minify-mangle-names/lib/index.js:196:26)
at newFn (/home/coder/project/fix-babel/node_modules/@babel/traverse/lib/visitors.js:218:17)
at bfsTraverse (/home/coder/project/fix-babel/node_modules/babel-plugin-minify-mangle-names/lib/bfs-traverse.js:32:43)
at Mangler.collect (/home/coder/project/fix-babel/node_modules/babel-plugin-minify-mangle-names/lib/index.js:229:7)
at Mangler.run (/home/coder/project/fix-babel/node_modules/babel-plugin-minify-mangle-names/lib/index.js:54:12)
at PluginPass.exit (/home/coder/project/fix-babel/node_modules/babel-plugin-minify-mangle-names/lib/index.js:558:19)
at newFn (/home/coder/project/fix-babel/node_modules/@babel/traverse/lib/visitors.js:177:21)
at NodePath._call (/home/coder/project/fix-babel/node_modules/@babel/traverse/lib/path/context.js:53:20)
at NodePath.call (/home/coder/project/fix-babel/node_modules/@babel/traverse/lib/path/context.js:40:17) {
code: 'BABEL_TRANSFORM_ERROR'
}
Describe the bug
mangling names don't work when there is a default parameter with a value referencing another variable like this:
This causes issues when trying to minify with mangling as described in this still open issue opened two years ago: #974
To Reproduce
Minimal code to reproduce the bug
Expected Output
Stack Trace
Configuration
package.json:
babel-minify-config: There is none
babelrc: There is none
The text was updated successfully, but these errors were encountered: