【问题标题】:Does GWT reuse Google Closure Compiler, and why if not?GWT 是否重用 Google Closure Compiler,如果不重用,为什么?
【发布时间】:2011-11-14 04:24:41
【问题描述】:

Google Web Toolkit (GWT) 执行 javascript 代码的内联,缩小和删除未使用的代码,以及 Google Closure Compiler 也完成的一些其他优化。所以我想知道闭包编译器是否实际上在 GWT 中使用,或者它们是否有两个单独的实现?如果是这样,那么在 GWT 中不重用 Google Closure Compiler 的限制/理由是什么?

【问题讨论】:

    标签: javascript gwt minify google-closure-compiler


    【解决方案1】:

    Commit 10778: Closure JS hookup 将 GWT 挂钩到闭包编译器。

    可能在 GWT 2.5 中,至少在幕后,GWT 可能会使用闭包编译器。


    更新

    Closure Support has been removed

    【讨论】:

    【解决方案2】:

    GWT 目前不使用 Closure Compiler,GWT 在 Java 形式的代码中进行大部分优化。

    虽然 CC 的许多方面对于 GWT 来说是多余的,但使用它还是有一些兴趣,但它并不像简单地对 GWT 输出进行后处理那样简单,因为默认的 GWT“链接器”会使代码对抄送。

    【讨论】:

    • CC 将是 GWT 2.5 中的一个可选增强功能,如下所述。
    猜你喜欢
    • 1970-01-01
    • 2019-09-27
    • 1970-01-01
    • 1970-01-01
    • 2011-12-25
    • 2016-12-30
    • 2023-03-23
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多