Closed mhuebner closed 4 years ago
restored several of these with minifyOptions languageMode and targetLanguage. Added back ES5 , ES5_STRICT, and ES3. Also made ES5 the default again even with babel so it transpiles cleanly. The reason some of these were removed is closure likes to include a library javascript file now which duplicates itself repeatedly and gets in the way.
There was a siginficant change in
ClosureCompilerProcessor.evaluateLanguageMode
starting from version 3.0.2. This change leeds to huge problems if you don't want to useES5
and don't want to transpile your JavaScript.Let's say you want to have
languageMode='ES5'
andtargetLanguage='ES5'
. Currently you are not able to solve this without using babel. But this makes absolutely no sense because you don't want to transpile which leeds to a much higher build time (buildTime forassetCompile
in our build is currently about 30 secs > with babel.js enabled it's about 4 mins).Have a look at the changes:
ClosureCompilerProcessor 3.0.1:
ClosureCompilerProcessor > 3.0.2:
With the latest code you have no chance to switch to older ES. Why not just allow all options / flags of googles closure compiler? I think it would be a great improvement if we could just use all of the possible flags from language_in and language_out (see https://github.com/google/closure-compiler/wiki/Flags-and-Options):
Or at least support all options which were removed in 3.0.1.