With babel.transform(inCode, {presets: ['minify', '@babel/preset-env']}): (maybe #904)
Error: Couldn't find intersection
at NodePath.getDeepestCommonAncestorFrom (/babel/babel/packages/babel-traverse/lib/path/ancestry.js:153:11)
at getSegmentedSubPaths (/babel/minify/packages/babel-plugin-minify-builtins/lib/index.js:244:14)
at BuiltInReplacer.replace (/babel/minify/packages/babel-plugin-minify-builtins/lib/index.js:92:31)
at PluginPass.exit (/babel/minify/packages/babel-plugin-minify-builtins/lib/index.js:205:27)
at newFn (/babel/babel/packages/babel-traverse/lib/visitors.js:193:21)
at NodePath._call (/babel/babel/packages/babel-traverse/lib/path/context.js:53:20)
at NodePath.call (/babel/babel/packages/babel-traverse/lib/path/context.js:40:17)
at NodePath.visit (/babel/babel/packages/babel-traverse/lib/path/context.js:97:8)
at TraversalContext.visitQueue (/babel/babel/packages/babel-traverse/lib/context.js:118:16)
at TraversalContext.visitSingle (/babel/babel/packages/babel-traverse/lib/context.js:90:19)
I'm not sure if this project is still maintained, but I'm reporting in case.
Not completely sure this is a different issue than #897, but the testcase is different.
With
evaluate
and no other passes:With
babel.transform(inCode, {presets: ['minify', '@babel/preset-env']})
: (maybe #904)Expected: