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 ...