@@ -47,27 +47,28 @@ export async function createAngularMemoryPlugin(
47
47
}
48
48
49
49
if ( importer ) {
50
- if ( source [ 0 ] === '.' && normalizePath ( importer ) . startsWith ( virtualProjectRoot ) ) {
50
+ const normalizedImporter = normalizePath ( importer ) ;
51
+ if ( source [ 0 ] === '.' && normalizedImporter . startsWith ( virtualProjectRoot ) ) {
51
52
// Remove query if present
52
- const [ importerFile ] = importer . split ( '?' , 1 ) ;
53
+ const [ importerFile ] = normalizedImporter . split ( '?' , 1 ) ;
53
54
source = '/' + join ( dirname ( relative ( virtualProjectRoot , importerFile ) ) , source ) ;
54
55
} else if (
55
56
! ssr &&
56
57
source [ 0 ] === '/' &&
57
58
importer . endsWith ( 'index.html' ) &&
58
- normalizePath ( importer ) . startsWith ( virtualProjectRoot )
59
+ normalizedImporter . startsWith ( virtualProjectRoot )
59
60
) {
60
61
// This is only needed when using SSR and `angularSsrMiddleware` (old style) to correctly resolve
61
62
// .js files when using lazy-loading.
62
63
// Remove query if present
63
- const [ importerFile ] = importer . split ( '?' , 1 ) ;
64
+ const [ importerFile ] = normalizedImporter . split ( '?' , 1 ) ;
64
65
source =
65
66
'/' + join ( dirname ( relative ( virtualProjectRoot , importerFile ) ) , basename ( source ) ) ;
66
67
}
67
68
}
68
69
69
70
const [ file ] = source . split ( '?' , 1 ) ;
70
- if ( outputFiles . has ( file ) ) {
71
+ if ( outputFiles . has ( normalizePath ( file ) ) ) {
71
72
return join ( virtualProjectRoot , source ) ;
72
73
}
73
74
} ,
0 commit comments