move default script type option to WebpackOptionsDefaulter

This commit is contained in:
Neehar Venugopal 2018-01-04 20:00:50 +05:30
parent be327f9718
commit 8eb0bb675e
2 changed files with 2 additions and 1 deletions

View File

@ -29,7 +29,7 @@ class JsonpMainTemplatePlugin {
const chunkMaps = chunk.getChunkMaps();
const crossOriginLoading = this.outputOptions.crossOriginLoading;
const chunkLoadTimeout = this.outputOptions.chunkLoadTimeout;
const jsonpScriptType = this.outputOptions.jsonpScriptType || "text/javascript";
const jsonpScriptType = this.outputOptions.jsonpScriptType;
const scriptSrcPath = this.applyPluginsWaterfall("asset-path", JSON.stringify(chunkFilename), {
hash: `" + ${this.renderCurrentHashCode(hash)} + "`,
hashWithLength: length => `" + ${this.renderCurrentHashCode(hash, length)} + "`,

View File

@ -61,6 +61,7 @@ class WebpackOptionsDefaulter extends OptionsDefaulter {
this.set("output.hotUpdateChunkFilename", "[id].[hash].hot-update.js");
this.set("output.hotUpdateMainFilename", "[hash].hot-update.json");
this.set("output.crossOriginLoading", false);
this.set("output.jsonpScriptType", "text/javascript");
this.set("output.chunkLoadTimeout", 120000);
this.set("output.hashFunction", "md5");
this.set("output.hashDigest", "hex");