Create folder. Open it in command line. Run npm install webpack -g. Create 2 files:
cats.js:
define(function(){
return ['dave', 'henry', 'martha'];
});
app.js
require(['./cats'],function(cats){
console.log(cats);
})
Run in command line:
webpack ./app.js app.bundle.js
Now i...