What compiler options are best to ensure that dartdevc generates minifier friendly javascript code which can be compressed by google closure compiler in ADVANCED mode.
Please show a tested example that specifies options for 1. dartdevc, and 2. java -jar goolge-closure-compiler.jar as a simple bash script, without pub.
Module type should be 'common' if possible, dart_sdk.js should be included, the final result should be es3 or es5 for compatibility with all browsers, and all output goes into one compressed .js file.
The
dartdevc
compiler is not meant for production usage at this time, and does not support any sort of "advanced" optimizations (such as those done by the Google Closure Compiler). Our only supported optimization path is usingdart2js
, our optimizing compiler which in many cases is as good as or better the Google Closure Compiler.See "When should I use dartdevc" on our FAQ page:
I'm excited you'd like to see
dartdevc
work for more use cases, but we are concentrating on a great developer experience and keeping optimization usage indart2js
at this time.