John Lenz

Results 56 comments of John Lenz

Are you using https://github.com/webpack-contrib/closure-webpack-plugin? In the abstract, without a plugin, this code is incompatible with Closure Compiler ADVANCED optimizations because from the compiler's perspective the definitions of "myFunction" are hidden...

Yes, setting it to 0 will tell it not to break at all.

I would like to see this added to assist in ES6 destructuring.

Unfortunately, the optional "map" function prevents this method from being marked as @nosideeffect. We need an annotation like "if the function is missing or known to be side effect free...

Looks like the polyfills are interfering with the analysis of the methods.

We generally allow the compiler to perform optimization with the assumption that the code is correct (we allow the compiler to "fix" broken code). If this were a "let" instead...

Hmmm, I would have expected the VariableReferenceChecks to be on by default? How are you running the compiler?

Something is not right with the webservice as well, even with // @warning_level VERBOSE the warning is not presented: https://closure-compiler.appspot.com/home#code%3D%252F%252F%2520%253D%253DClosureCompiler%253D%253D%250A%252F%252F%2520%2540compilation_level%2520ADVANCED_OPTIMIZATIONS%250A%252F%252F%2520%2540output_file_name%2520default.js%250A%252F%252F%2520%2540formatting%2520pretty_print%250A%252F%252F%2520%2540warning_level%2520VERBOSE%250A%252F%252F%2520%253D%253D%252FClosureCompiler%253D%253D%250A%250Avar%2520x%2520%253D%25201%253B%250Avar%2520z%2520%253D%2520function%2520()%2520%257B%250A%2520%2520%2520%2520var%2520y%2520%253D%2520x%253B%250A%2520%2520%2520%2520var%2520x%2520%253D%25200%253B%250A%2520%2520%2520%2520return%2520y%253B%250A%257D()%253B%250Aconsole.log(z)%253B%250A%250A But it is in the debugger with "all diagnostics" enabled:...

Ah, that would be effectively the "third_party" flag which is always on for the webservice