Minifier/compressors that rename functions cause Not() and Changed() to break
Closed this issue · 1 comments
vegeta897 commented
Terser and UglifyJS (to name two common ones) rename functions by default when minifying, and this breaks any code that relies on comparing function names to strings.
In my case, it causes Not()
to be ignored in queries. It probably affects Changed()
too.
My current workaround is just to disable renaming functions that match a regexp (keep_fnames: /^Query/
in Terser minify options)
Ideally the library should survive renamed functions, as this could be a very sinister hidden bug for anyone building minified bundles.
Update: I see 385f7fe; thank you and nice work! This issue can be closed now or I will close it when I have tried out the next release.
NateTheGreatt commented
0.3.18-1
:)