diff --git a/packages/angular_devkit/build_angular/src/tools/webpack/plugins/index-html-webpack-plugin.ts b/packages/angular_devkit/build_angular/src/tools/webpack/plugins/index-html-webpack-plugin.ts index 14f3a81069e1..2c4df5e45a0e 100644 --- a/packages/angular_devkit/build_angular/src/tools/webpack/plugins/index-html-webpack-plugin.ts +++ b/packages/angular_devkit/build_angular/src/tools/webpack/plugins/index-html-webpack-plugin.ts @@ -54,7 +54,8 @@ export class IndexHtmlWebpackPlugin extends IndexHtmlGenerator { try { for (const chunk of this.compilation.chunks) { for (const file of chunk.files) { - if (file.endsWith('.hot-update.js')) { + // https://github.com/webpack/webpack/blob/1f99ad6367f2b8a6ef17cce0e058f7a67fb7db18/lib/config/defaults.js#L1000 + if (file.endsWith('.hot-update.js') || file.endsWith('.hot-update.mjs')) { continue; }