Closed pvdlg closed 6 years ago
I get it. Thanks for reporting. Could you use v4 for now?
Yes sure, I'll keep using v4 until this is fixed.
Not sure what the solution is though. If it's indeed due to the way option are passed through jest-worker
, that might create an issue for each property that is not a String (not only the mangle property regex).
I just ran into a similar issue. Passing a regex to options.comments
causes all comments to be left in the file, and if I try a function it doesn't get called. Downgrading to v4 works as expected. The same issue exists in rollup-plugin-terser@2
.
Gonna fix after next rollup release with new lifecycle hooks
When passing an Uglify option that is a regex, Uglify fails with error
TypeError: regex.test is not a function
as it seemsrollup-plugin-uglify
somehow transform regexps into strings. It might happen when passing the option object to thejest-worker
.Here is the config to reproduce: