Skip to content

Instantly share code, notes, and snippets.

@christopherthielen
Created May 24, 2017 18:17
Show Gist options
  • Save christopherthielen/5b317e5ef8910ade34694786bf13f703 to your computer and use it in GitHub Desktop.
Save christopherthielen/5b317e5ef8910ade34694786bf13f703 to your computer and use it in GitHub Desktop.
warningsFilter only effective when `sourceMap` option is truthy
{
"devDependencies": {
"webpack": "^2.6.0"
}
}
"use strict"
var foo = "FOO";
var webpack = require('webpack');
module.exports = {
entry: {
"test": "./test.js",
},
output: {
filename: "[name].bundle.js",
},
plugins: [
new webpack.optimize.UglifyJsPlugin({
compress: true,
warningsFilter: function() { return false; },
sourceMap: false, // Warnings disappear when sourceMap is set to true
}),
],
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment