It depends on how you are including the JavaScript source. If it is a <script> tag in the .gwt.xml or the html host page, the GWT compiler barely knows it exists, and will do nothing with it. Likewise, if you use the ScriptInjector to make it available to the app, either from a url, or from a String or External/TextResource - as far as GWT can tell, its just a String.
If on the other hand you put it into a JSNI method, the compiler will understand that it is source and should be optimized as much as possible. Note however that JSNI is limited in how it can be optimized, though enabling the Closure compiler can often do a more comprehensive job of cleaning up that JS source, though this cleanup may in some cases break code that isn't prepared to be optimized in that way. On Wed, Dec 30, 2015 at 4:11 PM confile <michael.gorsk...@googlemail.com> wrote: > I have an external JavaScript file which I use using JSNI or JS Interop. > > I only use parts of this js file/ library. > > *Is it possible to reduce the code of this external js file using GWT?* > > -- > You received this message because you are subscribed to the Google Groups > "GWT Contributors" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/google-web-toolkit-contributors/4b0d67b6-ba5c-42d9-a5ff-894f7eccd752%40googlegroups.com > <https://groups.google.com/d/msgid/google-web-toolkit-contributors/4b0d67b6-ba5c-42d9-a5ff-894f7eccd752%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "GWT Contributors" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit-contributors/CADcXZMx1CUSViBvbgVoahrRsfBC0_nQucEurVRRkrOwGb5Nbvw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.