Created
May 24, 2017 18:17
-
-
Save christopherthielen/5b317e5ef8910ade34694786bf13f703 to your computer and use it in GitHub Desktop.
warningsFilter only effective when `sourceMap` option is truthy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"devDependencies": { | |
"webpack": "^2.6.0" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict" | |
var foo = "FOO"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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