Thursday, October 27, 2016

Re: Closure compiler and GWT 2.8.0

On Wednesday, October 26, 2016 at 11:21:02 PM UTC+2, Slava Pankov wrote:
Integrated closure compiler was removed in 2.8.0
So now I'm trying to use external (post-processing) call to closure compiler.
SIMPLE mode is working just fine, but gives no improvement over standard GWT compilation at all.
ADVANCED mode gives improvement (when GWT compiled in PRETTY mode), but produces non-working resulting JS, because it obfuscates $wnd. and __ functions/methods.
It could be kind of resolved by providing --externs to closure compiler, the problem is it doesn't support regexes, so I have to prepare huge file with exact names to be preserved (and it's semi-manual job, I don't know how to automate it).

1. So the question is - what is the proper way to get working JS by using external closure compiler?
2. There is an option in GWT "-XclosureFormattedOutput", when defined it affects resulting JS produced by GWT, but may be it's obsolete or not supposed to be used at all?

I think it's targeted at JsInterop exports so they're goog.export⋅ed thus usable by other Closure (JS) code in a "hybrid" Closure JS + GWT app (like Google Spreadsheet or Inbox).
3. I see pom-gwt.xml added to closure compiler repository on github few weeks ago, but cannot figure out what for it supposed to be used?

This is to compile the Closure Compiler itself to JS through GWT, so it can be used in Node without a JVM.

Don't have an answer to your first question though…

You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

No comments:

Post a Comment