Fábio Santos
Fábio Santos
I've worked around this by simply changing `'-'` to `/-/u`, putting this out here in case it's helpful.
Looks like the object isn't in alphabetical order, maybe this is why the build is red?
Hello! Terser already has a config file loading function, --config-file, but only on the CLI. The configuration file has basically the same format as the first argument to minify(), with...
Love your ideal example here 😃 I would like to have that too, but there are a few reasons I'd prefer that webpack and other tools do this (potentially by...
As a side note, I see this as something that could help debugging Terser itself. Lots of people come up to Terser and open issues about how something is crashing,...
@evilebottnawi is Terser not behaving as it should in the face of `eval` for some reason? Please do let me know.
@evilebottnawi Terser can minify `new Function(...)` in some situations, given the `unsafe_Function` option is enabled. If required, we can minify eval as well.
The `pure_annotations` format option allows to preserve the comments. I'm pushing a commit where you won't need to combine it with `comments: 'all'` for it to work.
Looking at this again, I realized that these properties are from the DOM, and covered by the domprops option. A complete list is here: https://github.com/terser/terser/blob/master/tools/domprops.js#L6965 You can disable the domprops...
I've had more time lately so I made a benchmark myself. In it, I'm running Terser as-is, and also Terser with property accesses replaced (with a regex) with bracketed property...