Here are the things I had the most trouble with in the beginning:
- Externals. I still have trouble wrapping my head around this directive.
- Multiple output paths for multiple entry points (it wasn't intuitive to make the entry point key a relative path and I had to discover this method on stack overflow).
To be fair, a proper set of documentation for webpack would be a several hundred page book.
Edit: I see my second point still isn't mentioned anywhere in the old or new docs. Specifically:
const ExtractCSS = new ExtractTextPlugin('[name].css');
...
entry: {
['./app/bundle']: './source/app/index.js',
['./admin/bundle']: './source/admin/index.js'
},
output: {
path: './build/',
filename: '[name].js'
}
...
would create: build/
app/
bundle.js
bundle.css
admin/
bundle.js
bundle.css