1// Based on the provided configuration (webpack.config.js),
2// webpack starts from the entry points and resolves each module it
3// encounters while constructing the dependency graph
4
5// entry points
6// the entry point is the module that webpack uses to start building its internal dependency graph.
7entry: {
8 'app': glob.sync('./vendor/**/*.js').concat(['./js/app.js'])
9 },
10
11
12// output point
13// the output property instructs webpack where to emit the bundle(s) and what name to use for the file(s)
14output: {
15 filename: '[name].js',
16 path: path.resolve(__dirname, '../priv/static/js'),
17 publicPath: '/js/'
18 },
19
20// dependency graph
21// From the entry point, webpack will configure a set of nodes connected to one
22// another as dependencies and will compile that to the output point
23