Run shell commands before, during, and after webpack 5 builds. Current stable version 2.3.3, with regular updates. Supports TypeScript types and provides fine-grained lifecycle hooks (onBuildStart, onBuildEnd, onBuildExit, onWatchRun, etc.) with blocking and parallel execution control. Differentiator: actively maintained fork of the original webpack-shell-plugin, compatible only with webpack 5 (v2.x) and offering more hooks and TypeScript support.
npm install webpack-shell-plugin-nextVerified import paths — ran on the pinned version, not inferred.
Configures the plugin with multiple lifecycle hooks, blocking/parallel options, environment variables, and logging control.
Upgrade to webpack 5 or use v1.x (webpack-shell-plugin-next@1) for webpack 4.
Change from `onBuildStart: ['echo start']` to `onBuildStart: { scripts: ['echo start'] }`.Replace `onBeforeBuild` with `onBuildStart`, `onBuildError` with `onFailedBuild`.
Set only one of them to true, or both to false.
Use `onBeforeNormalRun` or `onDoneWatch` for more precise control.
Replace `import WebpackShellPluginNext from 'webpack-shell-plugin-next'` with `const WebpackShellPluginNext = require('webpack-shell-plugin-next')`.Run `npm install --save-dev webpack-shell-plugin-next` and ensure webpack 5 is installed.
Ensure each lifecycle hook's scripts property is an array, e.g., `onBuildStart: { scripts: ['command'] }`.Set at most one of them to true, or leave both false (defaults to serial non-blocking).