Skip to content

Commit 5f14559

Browse files
authored
feat(performancebudgets): set warnings in console off by default, however should still display in stats (webpack#3604)
1 parent 92a8be2 commit 5f14559

6 files changed

Lines changed: 12 additions & 6 deletions

File tree

lib/WebpackOptionsDefaulter.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,7 @@ function WebpackOptionsDefaulter() {
7373

7474
this.set("performance.maxAssetSize", 250000);
7575
this.set("performance.maxEntrypointSize", 250000);
76-
this.set("performance.hints", "make", function(options) {
77-
if(options.target === "web" || options.target === "webworker")
78-
return "warning";
79-
else
80-
return false;
81-
});
76+
this.set("performance.hints", false);
8277

8378
this.set("resolve", {});
8479
this.set("resolve.unsafeCache", true);

test/fixtures/temp-1000/file.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
require('./file2'); again

test/fixtures/temp-1000/file2.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
original

test/statsCases/performance-no-async-chunks-shown/webpack.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ module.exports = {
33
main: "./index",
44
sec: "./index2"
55
},
6+
performance: {
7+
hints: "warning"
8+
},
69
stats: {
710
colors: true,
811
hash: false,

test/statsCases/preset-normal-performance-ensure-filter-sourcemaps/webpack.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
module.exports = {
22
devtool: "sourcemap",
3+
performance: {
4+
hints: "warning"
5+
},
36
entry: "./index",
47
stats: {
58
hash: false,

test/statsCases/preset-normal-performance/webpack.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
module.exports = {
22
entry: "./index",
3+
performance: {
4+
hints: "warning"
5+
},
36
stats: {
47
hash: false,
58
colors: true

0 commit comments

Comments
 (0)