warnings-to-errors-webpack-plugin
warnings-to-errors-webpack-plugin copied to clipboard
`warningsFilter` does not behave in the same manner as the default Webpack option
Followup to: https://github.com/taehwanno/warnings-to-errors-webpack-plugin/commit/07bcf4785d3cc13decf6cffdd76594215a8ebc35
This works if were targeting the warning message, but NOT the module id or context that triggered the warning.
Example Warning Object:
{
message: 'Critical dependency: the request of a dependency is an expression',
module: {
context: '/local-path/node_modules/yargs',
id: './node_modules/yargs/index.cjs',
},
}
// Does NOT work
webpackOptions.stats.warningsFilter: [/node_modules\/yargs/i];
// Works
webpackOptions.stats.warningsFilter: ['the request of a dependency is an expression'];
Note: If this plugin is not used, the [/node_modules\/yargs/i]
warning filter works fine -- they are just not transitioned to errors.
thanks for reporting this. I will check this out soon.