Skip to content

Commit

Permalink
feat(performancebudgets): set warnings in console off by default, how…
Browse files Browse the repository at this point in the history
…ever should still display in stats (#3604)
  • Loading branch information
TheLarkInn committed Dec 28, 2016
1 parent 92a8be2 commit 5f14559
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 6 deletions.
7 changes: 1 addition & 6 deletions lib/WebpackOptionsDefaulter.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,7 @@ function WebpackOptionsDefaulter() {

this.set("performance.maxAssetSize", 250000);
this.set("performance.maxEntrypointSize", 250000);
this.set("performance.hints", "make", function(options) {
if(options.target === "web" || options.target === "webworker")
return "warning";
else
return false;
});
this.set("performance.hints", false);

this.set("resolve", {});
this.set("resolve.unsafeCache", true);
Expand Down
1 change: 1 addition & 0 deletions test/fixtures/temp-1000/file.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
require('./file2'); again
1 change: 1 addition & 0 deletions test/fixtures/temp-1000/file2.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
original
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ module.exports = {
main: "./index",
sec: "./index2"
},
performance: {
hints: "warning"
},
stats: {
colors: true,
hash: false,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
module.exports = {
devtool: "sourcemap",
performance: {
hints: "warning"
},
entry: "./index",
stats: {
hash: false,
Expand Down
3 changes: 3 additions & 0 deletions test/statsCases/preset-normal-performance/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
module.exports = {
entry: "./index",
performance: {
hints: "warning"
},
stats: {
hash: false,
colors: true
Expand Down

0 comments on commit 5f14559

Please sign in to comment.