Skip to content

Commit 8eb0bb6

Browse files
committed
move default script type option to WebpackOptionsDefaulter
1 parent be327f9 commit 8eb0bb6

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lib/JsonpMainTemplatePlugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class JsonpMainTemplatePlugin {
2929
const chunkMaps = chunk.getChunkMaps();
3030
const crossOriginLoading = this.outputOptions.crossOriginLoading;
3131
const chunkLoadTimeout = this.outputOptions.chunkLoadTimeout;
32-
const jsonpScriptType = this.outputOptions.jsonpScriptType || "text/javascript";
32+
const jsonpScriptType = this.outputOptions.jsonpScriptType;
3333
const scriptSrcPath = this.applyPluginsWaterfall("asset-path", JSON.stringify(chunkFilename), {
3434
hash: `" + ${this.renderCurrentHashCode(hash)} + "`,
3535
hashWithLength: length => `" + ${this.renderCurrentHashCode(hash, length)} + "`,

lib/WebpackOptionsDefaulter.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ class WebpackOptionsDefaulter extends OptionsDefaulter {
6161
this.set("output.hotUpdateChunkFilename", "[id].[hash].hot-update.js");
6262
this.set("output.hotUpdateMainFilename", "[hash].hot-update.json");
6363
this.set("output.crossOriginLoading", false);
64+
this.set("output.jsonpScriptType", "text/javascript");
6465
this.set("output.chunkLoadTimeout", 120000);
6566
this.set("output.hashFunction", "md5");
6667
this.set("output.hashDigest", "hex");

0 commit comments

Comments
 (0)