Registry / devops / webpack-filter-warnings-plugin

webpack-filter-warnings-plugin

JSON →
library1.2.1jsnpmunverified

Webpack plugin that allows you to filter out specific warnings from webpack compilation output. Current stable version is 1.2.1, but it has not been updated since 2018 and only officially supports webpack 2, 3, and 4 (webpack 5 is not supported). This plugin is useful for suppressing unwanted warnings, but users on webpack 5 should consider alternatives like `ClientConfigPlugin` with built-in warning filtering or `webpack-fail-plugin` for different behavior. Note that it does not work with webpack 5 and may have stale peer dependencies.

npm install webpack-filter-warnings-plugin
INSTALL
IMPORT
SIG · WEBPACK-FILTER-WAR
W
webpack-filter-warnings-plugin
devopsjavascriptv1.2.1
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.

default
const FilterWarningsPlugin = require('webpack-filter-warnings-plugin');
import FilterWarningsPlugin from 'webpack-filter-warnings-plugin';
This package does not provide an ESM export; must use CommonJS require.
FilterWarningsPlugin
const FilterWarningsPlugin = require('webpack-filter-warnings-plugin');
import { FilterWarningsPlugin } from 'webpack-filter-warnings-plugin';
Correct import is the default export via require, not a named import.
plugin usage in webpack config
plugins: [new FilterWarningsPlugin({ exclude: /someWarning/ })]
plugins: [new FilterWarningsPlugin.exclude(/someWarning/)]
The exclude option is passed to the constructor, not a method.

Shows how to use commonjs require to import and configure the plugin to exclude warnings matching a regex.

const FilterWarningsPlugin = require('webpack-filter-warnings-plugin'); module.exports = { // other webpack config... plugins: [ new FilterWarningsPlugin({ exclude: /critical dependency/i }) ] };
Debug
Known issues
breakingWebpack 5 not supported
fix
Use webpack 4 or older, or switch to a different warning filtering approach for webpack 5 (e.g., custom plugin using webpack 5's infrastructure).
affects: >=1.0.0
deprecatedPackage has not been updated since 2018
fix
Consider using alternatives like `webpack-fail-plugin` or built-in webpack options.
affects: >=1.0.0
gotchaRequires CommonJS; no ESM support
fix
Use require() instead of import.
affects: >=1.0.0
Errors
Common errors & fixes
TypeError: FilterWarningsPlugin is not a constructor
Using ESM import syntax which returns the module object, not the constructor.
fix
Use const FilterWarningsPlugin = require('webpack-filter-warnings-plugin');
Error: Cannot find module 'webpack-filter-warnings-plugin'
Package not installed or incorrect import path.
fix
Run npm install webpack-filter-warnings-plugin --save-dev
Upgrade
Version history
1.2.1latest on npm
Audit
Dependencies
webpackrequiredpeer dependency; plugin hooks into webpack compilation lifecycle
Agent activity
14 hits · last 30 days
node
12
OpenAI (training)
2
Resources
webpack-filter-warnings-plugin — npm install webpack-filter-warnings-plugin · libregistry