From f2f3c9d8597644c01fc43ead336277dd27b9bc88 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Thu, 18 Jul 2024 09:04:10 +0000 Subject: [PATCH] fix(@angular/build): serve HTML files directly Ensure direct requests to HTML files result in them being served. Closes #28063 --- .../build/src/tools/vite/middlewares/assets-middleware.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/angular/build/src/tools/vite/middlewares/assets-middleware.ts b/packages/angular/build/src/tools/vite/middlewares/assets-middleware.ts index d1e4101cc89a..94d7aa0e46fa 100644 --- a/packages/angular/build/src/tools/vite/middlewares/assets-middleware.ts +++ b/packages/angular/build/src/tools/vite/middlewares/assets-middleware.ts @@ -66,7 +66,7 @@ export function createAngularAssetsMiddleware( // Resource files are handled directly. // Global stylesheets (CSS files) are currently considered resources to workaround // dev server sourcemap issues with stylesheets. - if (extension !== '.js' && extension !== '.html') { + if (extension !== '.js') { const outputFile = outputFiles.get(pathname); if (outputFile?.servable) { const mimeType = lookupMimeType(extension);