diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-10-14 18:40:54 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-10-14 18:40:54 +0200 |
commit | 9df98e65f842cf3acae09cbdd969966f42d64469 (patch) | |
tree | f071d3e09a342c208fb8e1cd3f5241d64fbfbaf3 /node_modules/webpack/lib/JsonpMainTemplatePlugin.js | |
parent | 008926b18470e7f394cd640302957b29728a9803 (diff) |
update dependencies
Diffstat (limited to 'node_modules/webpack/lib/JsonpMainTemplatePlugin.js')
-rw-r--r-- | node_modules/webpack/lib/JsonpMainTemplatePlugin.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/node_modules/webpack/lib/JsonpMainTemplatePlugin.js b/node_modules/webpack/lib/JsonpMainTemplatePlugin.js index 9a80e099d..20cecd919 100644 --- a/node_modules/webpack/lib/JsonpMainTemplatePlugin.js +++ b/node_modules/webpack/lib/JsonpMainTemplatePlugin.js @@ -171,6 +171,7 @@ class JsonpMainTemplatePlugin { mainTemplate.plugin("hot-bootstrap", function(source, chunk, hash) {
const hotUpdateChunkFilename = this.outputOptions.hotUpdateChunkFilename;
const hotUpdateMainFilename = this.outputOptions.hotUpdateMainFilename;
+ const crossOriginLoading = this.outputOptions.crossOriginLoading;
const hotUpdateFunction = this.outputOptions.hotUpdateFunction;
const currentHotUpdateChunkFilename = this.applyPluginsWaterfall("asset-path", JSON.stringify(hotUpdateChunkFilename), {
hash: `" + ${this.renderCurrentHashCode(hash)} + "`,
@@ -186,6 +187,7 @@ class JsonpMainTemplatePlugin { const runtimeSource = Template.getFunctionContent(require("./JsonpMainTemplate.runtime.js"))
.replace(/\/\/\$semicolon/g, ";")
.replace(/\$require\$/g, this.requireFn)
+ .replace(/\$crossOriginLoading\$/g, crossOriginLoading ? `script.crossOrigin = ${JSON.stringify(crossOriginLoading)}` : "")
.replace(/\$hotMainFilename\$/g, currentHotUpdateMainFilename)
.replace(/\$hotChunkFilename\$/g, currentHotUpdateChunkFilename)
.replace(/\$hash\$/g, JSON.stringify(hash));
|