Intro to webpack from here
cd webpack-tutorial
npm install
webpack
open index.html
To generate a production-ready (minified) script file, run NODE_ENV=production webpack
instead of webpack
- You have separate JS files
- Make one master scripts.js file and require() all your separate JS files
webpack
- this compiles 1 minified scripts.min.js file which includes all your JS files
- use nodemon to watch for changes and auto-reload