Skip to content

Commit bea90a6

Browse files
alan-agius4clydin
authored andcommitted
fix(@angular-devkit/build-angular): don't add .hot-update.js script tags
Closes #20855
1 parent 4dc7cf9 commit bea90a6

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

packages/angular_devkit/build_angular/src/webpack/plugins/index-html-webpack-plugin.ts

+10-7
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,16 @@ export class IndexHtmlWebpackPlugin extends IndexHtmlGenerator {
5858

5959
try {
6060
for (const [entryName, entrypoint] of this.compilation.entrypoints) {
61-
const entryFiles: FileInfo[] = entrypoint?.getFiles()?.map(
62-
(f: string): FileInfo => ({
63-
name: entryName,
64-
file: f,
65-
extension: extname(f),
66-
}),
67-
);
61+
const entryFiles: FileInfo[] = entrypoint
62+
?.getFiles()
63+
?.filter((f) => !f.endsWith('.hot-update.js'))
64+
.map(
65+
(f: string): FileInfo => ({
66+
name: entryName,
67+
file: f,
68+
extension: extname(f),
69+
}),
70+
);
6871

6972
if (!entryFiles) {
7073
continue;

0 commit comments

Comments
 (0)