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
I've been trying to minify my project using this library, but ran into this minimal reproduction:
foo.js:
varfoo="bar";({});varget={bar: ()=>foo()};
Running this on node will exit normally, however:
$ minify foo.js
var foo="bar",get;({},get={bar:()=>foo())}
Running this on node:
node_modules/tdewolff-minify/minify foo.js | node
[stdin]:1
var foo="bar",get;({},get={bar:()=>foo())}
^
SyntaxError: Unexpected token ')'
at new Script (node:vm:100:7)
at createScript (node:vm:257:10)
at Object.runInThisContext (node:vm:305:10)
at node:internal/process/execution:76:19
at [stdin]-wrapper:6:22
at evalScript (node:internal/process/execution:75:60)
at node:internal/main/eval_stdin:29:5
at Socket.<anonymous> (node:internal/process/execution:213:5)
at Socket.emit (node:events:539:35)
at endReadableNT (node:internal/streams/readable:1345:12)
It fails to parse the resulting js.
The text was updated successfully, but these errors were encountered:
Thanks for bringing this issue to the attention, I've fixed this and several other cases where it appeared! Please let me know if you find further issues.
I've been trying to minify my project using this library, but ran into this minimal reproduction:
foo.js:
Running this on node will exit normally, however:
Running this on node:
It fails to parse the resulting
js
.The text was updated successfully, but these errors were encountered: