Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,12 @@ HtmlWebpackPlugin.prototype.htmlWebpackPluginAssets = function (compilation, chu

// Prepend the public path to all chunk files
var chunkFiles = [].concat(chunk.files).map(function (chunkFile) {
return publicPath + chunkFile;
if (/^(?:[a-z][a-z0-9+\-.]*:)?\/\//.test(chunkFile)) {
// If the chunkFile is a URL (eg. a CDN), use it as is
return chunkFile;
} else {
return publicPath + chunkFile;
}
});

// Append a hash for cache busting
Expand Down