Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save thomasmichaelwallace/e4d15657678d474eb1ffaf092658b2d3 to your computer and use it in GitHub Desktop.
Save thomasmichaelwallace/e4d15657678d474eb1ffaf092658b2d3 to your computer and use it in GitHub Desktop.
Hiding webpack warnings
const webpack = require('webpack');
module.exports = {
// ... your webpack configuration ...
plugins: [
new webpack.ContextReplacementPlugin(
/\/package-name\//,
(data) => {
delete data.dependencies[0].critical;
return data;
},
),
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment