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);