Skip to content

Commit

Permalink
fix(@angular/build): normalize paths during module resolution in Vite
Browse files Browse the repository at this point in the history
Before this update, the importer path was not normalized, causing mismatches during SSR on Windows.
  • Loading branch information
alan-agius4 committed Jun 27, 2024
1 parent e6d5c7e commit 30473f9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 30473f9

Please sign in to comment.