

The JavaScript Packaging Problem - cbhl
http://jamie-wong.com/2014/11/29/the-js-packaging-problem/

======
edwinnathaniel
GWT solves some of these issues via Code Splitting:

[http://www.gwtproject.org/doc/latest/DevGuideCodeSplitting.h...](http://www.gwtproject.org/doc/latest/DevGuideCodeSplitting.html)

Step 1: GWT will compile + package everything into one big giant JS and one
big giant image file (CSS sprites is automagic in GWT via Java interface with
annotation, no longer one needs to download bajillion tools to stich the
images and write bajillion CSS coordinates to access the icons).

Step 2: Follow code splitting guide to asynchronously load your code :)

------
justinph
This is a good writeup. We ran into some of the same issues on the smaller
site I work on, compounded by use of pushState. We use require.js and a very
simple client side router to determine what packages to load, and depend on
require.js to pick up anything else.

[http://blogs.mpr.org/developer/2014/01/dynamically-
loading-a...](http://blogs.mpr.org/developer/2014/01/dynamically-loading-
assets-with-pjax-and-require-js/)

