google closure-complier一个问题的解决方法

来源:互联网 发布:淘宝最诚信的邮票商家 编辑:程序博客网 时间:2024/05/18 13:06

question:
In my environment I generate JS files which are loaded dynamically into target WEB page depending on various conditions - this means each file has to be transpiled individually and currently each of them contains plenty of polyfill code ($jscomp), 15K of polyfills per 5 lines of real code.
answer:
We’ve significantly changed the way we handle polyfills. Compiling an empty source with –inject_library=es6_runtime should bring in all polyfills, and does not require any source rewriting to use. It’s been a while, but if this does not meet your needs, please re-open.