Registry / devops / webpack-fail-plugin

webpack-fail-plugin

JSON →
library2.0.0jsnpmunverified

Webpack plugin that ensures the build process exits with a non-zero exit code when compilation errors occur in single-run mode. Current version 2.0.0 (last release) is deprecated because Webpack 2+ natively exits with an error code on failures. This plugin was a workaround for Webpack 1.x where errors did not propagate correctly. No active development; the package is effectively in maintenance mode for legacy Webpack 1.x projects. For Webpack 2+, the built-in behavior should be sufficient.

npm install webpack-fail-plugin
INSTALL
IMPORT
SIG · WEBPACK-FAIL-PLUGI
W
webpack-fail-plugin
devopsjavascriptv2.0.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
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 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

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

failPlugin
var failPlugin = require('webpack-fail-plugin');
CommonJS require is the standard. ESM usage is not officially supported.
default import
import failPlugin from 'webpack-fail-plugin';
ESM syntax may work depending on bundler config, but not officially documented.

Basic Webpack config using the fail plugin to ensure non-zero exit code on errors (only needed for Webpack 1.x).

var failPlugin = require('webpack-fail-plugin'); module.exports = { entry: './index.js', output: { filename: 'bundle.js' }, plugins: [ failPlugin ] };
Debug
Known issues
deprecatedPlugin is deprecated; Webpack 2+ natively returns non-zero exit code on compilation errors.
fix
Remove the plugin for Webpack 2+ projects; for Webpack 1.x, it may still be needed.
affects: >=2.0.0
gotchaDoes not support Webpack 2+ officially; may cause unexpected behavior if used with newer Webpack versions.
fix
Do not use with Webpack 2+ unless you experience a bug; prefer native exit behavior.
affects: >=2.0.0
Errors
Common errors & fixes
Error: webpack-fail-plugin is not supported for webpack 2+
Plugin is deprecated and not tested with Webpack 2+.
fix
Remove the plugin; Webpack 2+ handles exit codes natively.
Upgrade
Version history
2.0.0latest on npm
Audit
Dependencies
webpackrequiredPeer dependency; plugin works with Webpack 1.x, 2.x, and 3.x but only needed for 1.x
Agent activity
9 hits · last 30 days
node
8
Amazon
1
Resources
webpack-fail-plugin — npm install webpack-fail-plugin · libregistry