1.0.0 • Published 3 years ago

file-generator-webpack-plugin v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Create file plugin for WebPack

License: MIT

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'
};