mirror of https://github.com/webpack/webpack.git
allow boolean values for node and performance
This commit is contained in:
parent
f04cce8278
commit
50201047d7
|
|
@ -68,7 +68,13 @@ class WebpackOptionsDefaulter extends OptionsDefaulter {
|
|||
this.set("output.devtoolLineToLine", false);
|
||||
this.set("output.strictModuleExceptionHandling", false);
|
||||
|
||||
this.set("node", "call", value => Object.assign({}, value));
|
||||
this.set("node", "call", value => {
|
||||
if(typeof value === "boolean") {
|
||||
return value;
|
||||
} else {
|
||||
return Object.assign({}, value);
|
||||
}
|
||||
});
|
||||
this.set("node.console", false);
|
||||
this.set("node.process", true);
|
||||
this.set("node.global", true);
|
||||
|
|
@ -77,7 +83,13 @@ class WebpackOptionsDefaulter extends OptionsDefaulter {
|
|||
this.set("node.__filename", "mock");
|
||||
this.set("node.__dirname", "mock");
|
||||
|
||||
this.set("performance", "call", value => Object.assign({}, value));
|
||||
this.set("performance", "call", value => {
|
||||
if(typeof value === "boolean") {
|
||||
return value;
|
||||
} else {
|
||||
return Object.assign({}, value);
|
||||
}
|
||||
});
|
||||
this.set("performance.maxAssetSize", 250000);
|
||||
this.set("performance.maxEntrypointSize", 250000);
|
||||
this.set("performance.hints", false);
|
||||
|
|
|
|||
Loading…
Reference in New Issue