Hi there,
I've have defined a second set of permutations for our app based on screen size. When screen size dips below 768, the property "form.factor" is set to "mini", and we bind the entry point to a different implementation.
<replace-with class="com.acme.ui.client.MiniEntryPoint">
<when-type-is class="com.acme.ui.client.LargeEntryPoint" />
<when-property-is name="form.factor" value="mini"/>
</replace-with>
The LargeEntryPoint contains many more features, and uses GWT.runAsync() to split some of the larger ones from the initial download.
The mini permutations correctly only include the features included from MiniEntryPoint. BUT they also include identical splits for each of the GWT.runAsync() calls, even though the GWT.runAsync() calls are not reachable from MiniEntryPoint.
I've even tried wrapping the calls to GWT.runAsync() in:
if(System.getProperty("form.factor").equals("full")) {
GWT.runAsync(new RunAsyncCallback() {
// ...
});
}
but it has no impact - the code splits are generated all the same.
This isn't a show stopper as these split points are ever loaded from the mini app, but it would be nice to reduce the extra compile and deploy time involved in these large split points.
Is it possible that the code splitting runs before dead code elimination in each permutation? Any workarounds?
Thanks,
Alex