Wednesday, October 26, 2016

Closure compiler and GWT 2.8.0

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?
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? https://github.com/google/closure-compiler/blob/master/pom-gwt.xml

--
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 google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment