We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ea97fbe commit 253ce30Copy full SHA for 253ce30
index.js
@@ -581,11 +581,12 @@ class HtmlWebpackPlugin {
581
// compilation.getAsset was introduced in webpack 4.4.0
582
// once the support pre webpack 4.4.0 is dropped please
583
// remove the following guard:
584
- if (!compilation.getAsset) {
+ const asset = compilation.getAsset && compilation.getAsset(chunkFile);
585
+ if (!asset) {
586
return true;
587
}
588
// Prevent hot-module files from beeing included:
- const assetMetaInformation = compilation.getAsset(chunkFile).info || {};
589
+ const assetMetaInformation = asset.info || {};
590
return !(assetMetaInformation.hotModuleReplacement || assetMetaInformation.development);
591
});
592
0 commit comments