From cd97134a6e1468c6806c2bd753c934ec91bc3927 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Thu, 27 Jun 2024 06:56:28 +0000 Subject: [PATCH] fix(@angular/build): normalize paths during module resolution in Vite Before this update, the importer path was not normalized, causing mismatches during SSR on Windows. (cherry picked from commit 30473f92032a52146efe80e82e19af25810c1780) --- packages/angular/build/src/tools/vite/angular-memory-plugin.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/angular/build/src/tools/vite/angular-memory-plugin.ts b/packages/angular/build/src/tools/vite/angular-memory-plugin.ts index a7c043e55660..1f03bf69a790 100644 --- a/packages/angular/build/src/tools/vite/angular-memory-plugin.ts +++ b/packages/angular/build/src/tools/vite/angular-memory-plugin.ts @@ -55,7 +55,7 @@ export function createAngularMemoryPlugin(options: AngularMemoryPluginOptions): return source; } - if (importer && source[0] === '.' && importer.startsWith(virtualProjectRoot)) { + if (importer && source[0] === '.' && normalizePath(importer).startsWith(virtualProjectRoot)) { // Remove query if present const [importerFile] = importer.split('?', 1);