1.0.0 • Published 3 years ago
file-generator-webpack-plugin v1.0.0
Create file plugin for WebPack
Webpack plugin for generating a file based on particular step of build process.
Installation
npm i file-generator-webpack-plugin --save-dev
Usage
const GenerateFilePlugin = require('file-generator-webpack-plugin')
// webpack config
{
plugins: [
new GenerateFilePlugin({options})
]
}
List of possible options:
var opts = {
// path to folder in which the file will be created
path: './dist',
// file name
fileName: 'file.js',
// content of the file
content: 'export * from ./module.umd.js',
// optional field that represents the name of the compiler hook https://webpack.js.org/api/compiler-hooks/ . Default value is 'done'.
hook: 'compile'
};
1.0.0
3 years ago