3 ms·
The JavaScript Packaging Problem
- edwinnathaniel 12y agoGWT solves some of these issues via Code Splitting: http://www.gwtproject.org/doc/latest/DevGuideCodeSplitting.html http://www.gwtproject.org/doc/latest/DevGuideCodeSplitting.h... 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 12y agoThis 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-assets-with-pjax-and-require-js/ http://blogs.mpr.org/developer/2014/01/dynamically-loading-a...