Assets Append Webpack Plugin
This plugin allow you to append text/code/whatever to your assets with webpack 2.
Requirements
- node >= 6.9.4
- webpack >= 2.2.0
Installation
npm install assets-append-webpack-plugin --save
Or add it to your package.json
Usage
Add the plugin in your webpack.config.js
:
'use strict'; const AssetsAppendWebpackPlugin = ; moduleexports = entry: 'foo.js' output: path: './build' filename: '[name].js' plugins: header: '/* lorem ipsum */' footer: '/* lorem ipsum */' ;
This plugin take an object or an array of objects. Each object can take theses arguments:
header: '/* lorem ipsum */' footer: '/* lorem ipsum */' match: /buildname.js/ // optional: bundle's name must match this pattern, useful if you want to have differents header/footer for your bundles