npm install metalsmith-webpack-2
options may be:
- a webpack configuration object.
- a path to your webpack configuration file
- null / undefined, config will be read from
Construct your webpack config exactly as you would if you were calling webpack from the command line.
Note: It's important that absolute paths are provided to webpack, as is normal webpack behaviour. That means including your
build directories as demonstrated above.
This example uses an asset's hash in it's filename (fingerprinting / cache busting). The filename for this asset will be stored in metalsmith meta, so you could access it from a template with something like:
This plugin will not ignore source files, you should use metalsmith-ignore for that
$ npm test
MIT License, see LICENSE for details.