@davidsemakula/webpack-spawn-plugin
v0.1.3
Published
A webpack plugin that runs child_process.spawn within compilation
Downloads
2
Maintainers
Readme
Webpack Spawn Plugin
A webpack plugin that runs child_process.spawn
within compilation.
Install
NPM
npm install --save-dev @davidsemakula/webpack-spawn-plugin
Yarn
yarn add --dev @davidsemakula/webpack-spawn-plugin
Usage
import SpawnPlugin from '@davidsemakula/webpack-spawn-plugin'
const config = {
...
plugins: [
new SpawnPlugin('node', ['.'], options)
]
}
Options
when
(default: "done")
The Webpack compiler hook during which the process will be spawned.
stdio
(default: "inherit")
The output stream to which stdout and stderr will be sent.
persistent
(default: false)
Indicates whether the spawned process should be replaced every time the hook is called.
Acknowledgements
Inspired by https://github.com/diegohaz/webpack-spawn-plugin but with support for newer versions of webpack.
License
MIT