Does GWT reuse Google Closure Compiler, and why if not?

流过昼夜 提交于 2019-12-23 23:10:56

问题


Google Web Toolkit (GWT) performs inlining of javascript code, minifying and removing unused code, and some other optimizations which are also done by Google Closure Compiler. So I was wondering if Closure Compiler is in fact utilized in GWT or do they have two separate implementations? If so, then what is the restriction/reasoning for not reusing Google Closure Compiler in GWT?


回答1:


Commit 10778: Closure JS hookup hooks GWT to the closure compiler.

Probably with GWT 2.5, at least behind the scenes, GWT may use the closure compiler.


Update

Closure Support has been removed




回答2:


GWT does not currently use Closure Compiler, GWT does the bulk of its optimization while the code is in Java form.

While there are many aspects of CC that are redundant for GWT, there is some interest in using it, however it isn't as simple as simply post processing the GWT output as the default GWT "linker" makes the code opaque to CC.



来源:https://stackoverflow.com/questions/7368681/does-gwt-reuse-google-closure-compiler-and-why-if-not

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!