improve detection when auto publicPath can be used

This commit is contained in:
Tobias Koppers 2020-09-18 10:26:29 +02:00
parent 2f01aac8ce
commit 5cf0b8288c
1 changed files with 7 additions and 1 deletions

View File

@ -553,7 +553,6 @@ const applyOutputDefaults = (
});
D(output, "assetModuleFilename", "[hash][ext][query]");
D(output, "webassemblyModuleFilename", "[hash].module.wasm");
D(output, "publicPath", tp ? (tp.web ? "auto" : "") : "");
D(output, "compareBeforeEmit", true);
D(output, "charset", true);
F(output, "hotUpdateGlobal", () =>
@ -639,6 +638,13 @@ const applyOutputDefaults = (
D(output, "hotUpdateMainFilename", "[fullhash].hot-update.json");
D(output, "crossOriginLoading", false);
F(output, "scriptType", () => (output.module ? "module" : false));
D(
output,
"publicPath",
(tp && (tp.document || tp.importScripts)) || output.scriptType === "module"
? "auto"
: ""
);
D(output, "chunkLoadTimeout", 120000);
D(output, "hashFunction", "md4");
D(output, "hashDigest", "hex");