Skip to content

Commit b3f0dda

Browse files
committed
Load extra JSONP chunks with async script tags
If requests are made while other chunks are loading, it can cause blocking requests to load the additional chunks. Code splitting should ensure that you can load these chunks completely async, and so we should.
1 parent 86a403d commit b3f0dda

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎lib/JsonpMainTemplatePlugin.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ JsonpMainTemplatePlugin.prototype.apply = function(mainTemplate) {
5959
"var script = document.createElement('script');",
6060
"script.type = 'text/javascript';",
6161
"script.charset = 'utf-8';",
62+
"script.async = true;",
6263
"script.src = " + this.requireFn + ".p + " +
6364
this.applyPluginsWaterfall("asset-path", JSON.stringify(chunkFilename), {
6465
hash: "\" + " + this.renderCurrentHashCode(hash) + " + \"",

0 commit comments

Comments
 (0)