This demonstrates an approach to splitting code into multiple bundles using Browserify. This example splits out node_modules
into a separate vendor
bundle. The approach is generic, however, and can be used to split code using arbitrary criteria. If you encounter problems using this pattern in production, please open an issue.
The bundle splitting logic is contained in builder.js
.
Huge thanks to @jjm for his help designing this solution as well as for the pathmodify plugin this depends on.
###Usage
npm install
mkdir build
node builder.js
cd build/
python -m SimpleHTTPServer <port>
(or your webserver of choice)