{"id":20761,"library":"webpack-fail-plugin","title":"webpack-fail-plugin","description":"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.","status":"deprecated","version":"2.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/TiddoLangerak/webpack-fail-plugin","tags":["javascript","webpack"],"install":[{"cmd":"npm install webpack-fail-plugin","lang":"bash","label":"npm"},{"cmd":"yarn add webpack-fail-plugin","lang":"bash","label":"yarn"},{"cmd":"pnpm add webpack-fail-plugin","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency; plugin works with Webpack 1.x, 2.x, and 3.x but only needed for 1.x","package":"webpack","optional":false}],"imports":[{"note":"CommonJS require is the standard. ESM usage is not officially supported.","symbol":"failPlugin","correct":"var failPlugin = require('webpack-fail-plugin');"},{"note":"ESM syntax may work depending on bundler config, but not officially documented.","symbol":"default import","correct":"import failPlugin from 'webpack-fail-plugin';"}],"quickstart":{"code":"var failPlugin = require('webpack-fail-plugin');\n\nmodule.exports = {\n  entry: './index.js',\n  output: { filename: 'bundle.js' },\n  plugins: [ failPlugin ]\n};","lang":"javascript","description":"Basic Webpack config using the fail plugin to ensure non-zero exit code on errors (only needed for Webpack 1.x)."},"warnings":[{"fix":"Remove the plugin for Webpack 2+ projects; for Webpack 1.x, it may still be needed.","message":"Plugin is deprecated; Webpack 2+ natively returns non-zero exit code on compilation errors.","severity":"deprecated","affected_versions":">=2.0.0"},{"fix":"Do not use with Webpack 2+ unless you experience a bug; prefer native exit behavior.","message":"Does not support Webpack 2+ officially; may cause unexpected behavior if used with newer Webpack versions.","severity":"gotcha","affected_versions":">=2.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Remove the plugin; Webpack 2+ handles exit codes natively.","cause":"Plugin is deprecated and not tested with Webpack 2+.","error":"Error: webpack-fail-plugin is not supported for webpack 2+"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}