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.

(cherry picked from commit 30473f9)
  • Loading branch information
alan-agius4 committed Jun 27, 2024
1 parent 12b96d1 commit cd97134
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 cd97134

Please sign in to comment.