@davidsemakula/webpack-spawn-plugin

0.1.3 • Public • Published

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

Package Sidebar

Install

npm i @davidsemakula/webpack-spawn-plugin

Weekly Downloads

2

Version

0.1.3

License

MIT

Unpacked Size

2.96 kB

Total Files

4

Last publish

Collaborators

  • davidsemakula