@@ -47,27 +47,28 @@ export async function createAngularMemoryPlugin(
4747 }
4848
4949 if ( importer ) {
50- if ( source [ 0 ] === '.' && normalizePath ( importer ) . startsWith ( virtualProjectRoot ) ) {
50+ const normalizedImporter = normalizePath ( importer ) ;
51+ if ( source [ 0 ] === '.' && normalizedImporter . startsWith ( virtualProjectRoot ) ) {
5152 // Remove query if present
52- const [ importerFile ] = importer . split ( '?' , 1 ) ;
53+ const [ importerFile ] = normalizedImporter . split ( '?' , 1 ) ;
5354 source = '/' + join ( dirname ( relative ( virtualProjectRoot , importerFile ) ) , source ) ;
5455 } else if (
5556 ! ssr &&
5657 source [ 0 ] === '/' &&
5758 importer . endsWith ( 'index.html' ) &&
58- normalizePath ( importer ) . startsWith ( virtualProjectRoot )
59+ normalizedImporter . startsWith ( virtualProjectRoot )
5960 ) {
6061 // This is only needed when using SSR and `angularSsrMiddleware` (old style) to correctly resolve
6162 // .js files when using lazy-loading.
6263 // Remove query if present
63- const [ importerFile ] = importer . split ( '?' , 1 ) ;
64+ const [ importerFile ] = normalizedImporter . split ( '?' , 1 ) ;
6465 source =
6566 '/' + join ( dirname ( relative ( virtualProjectRoot , importerFile ) ) , basename ( source ) ) ;
6667 }
6768 }
6869
6970 const [ file ] = source . split ( '?' , 1 ) ;
70- if ( outputFiles . has ( file ) ) {
71+ if ( outputFiles . has ( normalizePath ( file ) ) ) {
7172 return join ( virtualProjectRoot , source ) ;
7273 }
7374 } ,
0 commit comments