Registry / devops / webpack-synchronizable-shell-plugin

webpack-synchronizable-shell-plugin

JSON →
library0.0.7jsnpmunverified

A webpack plugin that runs shell commands before, after, or on exit of the build process, forked from webpack-shell-plugin. Version 0.0.7 (2018) is the latest stable release; no updates since. Unlike alternatives, it provides fine-grained control over script execution order with blocking and parallel options per lifecycle hook (onBuildStart, onBuildEnd, onBuildExit). Suitable for tasks like linting, testing, or deployment scripts. Note: development seems abandoned; last commit 2018.

npm install webpack-synchronizable-shell-plugin
INSTALL
IMPORT
SIG · WEBPACK-SYNCHRONIZ
W
webpack-synchronizable-shell-plugin
devopsjavascriptv0.0.7
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18–223 runs
build_error
glibc
node 18–223 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

WebpackSynchronizableShellPlugin
✓ const WebpackSynchronizableShellPlugin = require('webpack-synchronizable-shell-plugin');
✗ import WebpackSynchronizableShellPlugin from 'webpack-synchronizable-shell-plugin';
Package does not provide ES modules; must use require() in webpack.config.js.
new WebpackSynchronizableShellPlugin({...})
✓ new WebpackSynchronizableShellPlugin({ onBuildStart: { scripts: ['echo start'], blocking: true } })
✗ new WebpackSynchronizableShellPlugin({ scripts: ['echo start'] })
Plain object with scripts array is not accepted; must use lifecycle hooks like onBuildStart.
configuration structure
✓ onBuildStart: { scripts: [], blocking: false, parallel: false }
✗ onBuildStart: [] // directly passing array
Each lifecycle hook expects an object with scripts, blocking, parallel properties.

Shows typical setup with three lifecycle hooks, blocking/parallel options, and plugin instantiation in webpack config.

const WebpackSynchronizableShellPlugin = require('webpack-synchronizable-shell-plugin'); module.exports = { entry: './src/index.js', output: { path: __dirname + '/dist', filename: 'bundle.js' }, plugins: [ new WebpackSynchronizableShellPlugin({ onBuildStart: { scripts: ['echo "Build starting..."'], blocking: true, parallel: false }, onBuildEnd: { scripts: ['echo "Build complete"'], blocking: false, parallel: true }, onBuildExit: { scripts: ['echo "Done"'], blocking: false, parallel: false }, dev: true, safe: false }) ] };
Debug
Known issues
gotchaCombining blocking:true with parallel:true is not supported; behavior undefined.
fix
Set at most one to true; if both needed, use sequential scripts or separate hooks.
affects: >=0.0.0
breakingAPI differs from webpack-shell-plugin; direct scripts array is not accepted.
fix
Wrap scripts in onBuildStart/onBuildEnd/onBuildExit objects.
affects: 0.0.0 - 0.0.7
deprecatedOption 'verbose' is deprecated and has no effect.
fix
Remove 'verbose' from configuration.
affects: >=0.0.7
gotchaonBuildExit fires during watch mode after each compilation; not just on process exit.
fix
Use onBuildEnd for post-compilation tasks if you want to avoid repeated exit hooks.
affects: >=0.0.0
Errors
Common errors & fixes
TypeError: Cannot read property 'scripts' of undefined
Passing scripts directly to plugin constructor instead of inside an object under onBuildStart/onBuildEnd/onBuildExit.
fix
Wrap scripts array inside an object, e.g., onBuildStart: { scripts: ['...'], blocking: false, parallel: false }
Error: spawn ENOENT
Shell command not found or safe:false default (uses spawn) fails on some systems.
fix
Set safe:true to use exec instead of spawn, or provide full path to command.
Upgrade
Version history
0.0.7latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
17 hits · last 30 days
node
14
Amazon
1
Resources
webpack-synchronizable-shell-plugin — npm install webpack-synchronizable-shell-plugin · libregistry