A webpack plugin that runs child_process.spawn during compilation, useful for running shell commands or starting processes as part of the build pipeline. The latest stable version is 0.3.0, released infrequently with last update in 2018. It supports Webpack 4+ hooks via the 'when' option (default 'done') and offers a 'persistent' flag to avoid respawning on recompilation. Compared to alternatives like webpack-shell-plugin or webpack-exec-plugin, this one directly uses Node's spawn for more control over stdio and process handling.
npm install webpack-spawn-pluginVerified import paths — ran on the pinned version, not inferred.
Shows basic usage: import the plugin, create a new instance with command and arguments, and add to plugins array.
Use webpack 4+ or stick with v0.1.x for older webpack versions.
Use 'persistent: true' to avoid respawning on rebuilds, but beware that the process may linger.
Manually manage the child process reference and kill it when done.
Use `const SpawnPlugin = require('webpack-spawn-plugin').default;` or enable esModuleInterop in tsconfig.Run `npm install --save-dev webpack-spawn-plugin`.
No dependency data recorded yet.