Open ElStupid opened 2 years ago
Updated problem description above. The "use strict" is only generated when Re-compile file is chosen.
@failwyn Any updates on this issue? I read more people suffer from this. I have a lot of troubles with minified files. It would be very usefull to have an option for this (maybe on a per file basis)
@ElStupid I’ll take a look at it; I’m trying to wait for a new NUglify release to fix a few issues as well.
Installed product versions
Description
A compilerconfig.json option for using "use strict" in javascript minification is highly wanted. It has been asked in Mads' version multiple times, but never created. Now the compiled version of a javascript file always has the "use strict" statement whenever we use Webcompiler, Re-compile file. It also recompiles all files when you add a new js to the compilerconfig and thus add the "use strict" again.
Steps to recreate
Current behavior
Re-compiled minified javascript files get the "use strict" statement by default. This is unwanted, because if one would like to use strict, one should enable that in unminified javascript or have an option to enable it. In which case the minifier should use it too. There's no option to switch off this behavior in compilerconfig.
Expected behavior
Have an option in compilerconfig.json. enabled by default. When set to disabled and no statement in unminified version, the minified version shouldn't have it too. Only when enabled by default or explicitly set, we should get "use strict" in the minified javascript file.