webpack-add-assets
Plugin for webpack.
Add additional assets to webpack build directory.
Requirements
- webpack - version >= 4
Install
$ npm install --save-dev @elricb/webpack-add-assets
Example
const WebpackAddAssets = require("@elricb/webpack-add-assets");
const webpackConfig = {
// Config items
plugins: [
new WebpackAddAssets({
"local/path/file.txt": "remote/path/file.txt"
})
],
// Config items
};
class WebpackAddAssets
const webpackAddAssets = new WebpackAddAssets(assets);
assets
Type: object
A key/value list of source files to destination files.
{
"relative/local/path/to/asset/favicon.gif": "relative/destination/path/to/asset/favicon.gif",
"another/local/asset/favicon.ico": "another/destination/asset/favicon.gif"
}