Slide 29
Slide 29 text
// webpack.config.js
var webpack = require('webpack');
module.exports = {
context: __dirname + '/app/assets/javascripts',
entry: {
application: './_application.js',
vendor: './_vendor.js',
},
output: {
filename: '[name].bundle.js',
path: __dirname + '/vendor/assets/javascripts',
},
};
The Webpack config to make all this work is actually quite simple, we have an entry point which loads our modular JS
requires, and an output, which dumps the static assets.