Reputation:
With GWT I can use JSNI to include external libraries like JQuery.
If I use an external library with JSNI what does the GWT compiler do?
Does it include the hole full size JavaScript library?
Does it include only the code of the library that have been used?
Upvotes: 2
Views: 159
Reputation: 64561
Assuming you copied the whole jQuery script into a JSNI method (ouch!), then GWT will do its best to optimize it, including pruning dead code. Results would really depend on the JS code though, not everything can be statically analyzed to determine what code will or won't be used.
Upvotes: 2