Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save morsdyce/eda4d9b591ef08523fe725feee16db62 to your computer and use it in GitHub Desktop.
Save morsdyce/eda4d9b591ef08523fe725feee16db62 to your computer and use it in GitHub Desktop.
var webpackConfig = {
plugins: [
// Plugin to show any webpack warnings and prevent tests from running
function () {
this.plugin("done", function (stats) {
if (stats.compilation.warnings.length) {
// Log each of the warnings
stats.compilation.warnings.forEach(function (warning) {
console.log(warning.message || warning);
});
// Pretend no assets were generated. This prevents the tests
// from running making it clear that there were warnings.
stats.stats = [{
toJson: function () {
return this;
},
assets: []
}];
}
});
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment