Fábio Santos
Fábio Santos
It was just side effects within the `typeof` expression. Forms like `typeof {x: sideEffect()}` shouldn't be just turned into `'object'`. But it's fixed now
Assigned you! The code to change is in lib/minify.js and lib/propmangle.js
Thanks @Conduitry
Hey there! I'm slowly deprecating output options that are merely about beautification. Is there a reason to keep the backticks other than style? If not, I'm afraid I'm closing this...
I'm happy to make this a compressor option -- it's not an output option since it modifies the AST.
@moshfeu AST is the tree that represents the JS code, upon which terser operates to compress.
It might be complicated. quote_style is an output option and it needs to be read during compress to avoid turning template literals into strings. I wouldn't think there are performance...
There's only a few places where a template string or tagged template string is turned into just a string. All of them are in lib/compress.js, in the def_eval and def_compress...
This looks really promising! Node 10 isn't liking the `?.` syntax though, and I guess .findLastIndex is also out of the table. I'll have a closer look this afternoon.
I finally understood the whole thing :) I see that you're using indices in AST traversal order, and then comparing the first read of a defun to the last write...