O'Reilly logo

Continuous Integration, Delivery, and Deployment by Sander Rossel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Bundling JavaScript with Browserify

Now that we have minified all of our code, we want our HTML files to reference the newly created files. The easiest solution is to keep the complete folder structure and filenames the same as before minification. If you move index.js to the views folder and fix all the references to other files, you are pretty much done. However, if you did not do that, for whatever reason you have, or you suffixed your minified files with .min.ext, you will need to do some additional work. You probably want to do some additional work anyway, as we have not yet bundled our JavaScript and CSS yet.

Bundling JavaScript is difficult. The pain is in managing your dependencies. Let's say we have scripts A, B, and C. C depends ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required