File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -57,12 +57,15 @@ export function findLazyModules(projectRoot: any): string[] {
5757 findLoadChildren ( tsPath ) . forEach ( moduleName => {
5858 const fileName = path . resolve ( path . dirname ( tsPath ) , moduleName ) + '.ts' ;
5959 if ( fs . existsSync ( fileName ) ) {
60- // Put the moduleName as relative to the main.ts .
60+ // Convert the file path to a url .
6161 const posix = path . posix ;
62- const normalizedPath = posix . normalize ( tsPath ) ;
63- const nomalizedModuleName = posix . normalize ( moduleName ) ;
64- const fullPath = posix . resolve ( posix . dirname ( normalizedPath ) , nomalizedModuleName ) ;
65- const name = `./${ posix . relative ( projectRoot , fullPath ) } .ts` ;
62+ const normalizedPath = tsPath . replace ( / \\ / g, posix . sep ) ;
63+ const normalizedModuleName = moduleName . replace ( / \\ / g, posix . sep ) ;
64+ const normalizedProjectRoot = projectRoot . replace ( / \\ / g, posix . sep ) ;
65+
66+ // Put the moduleName as relative to the main.ts.
67+ const fullPath = posix . resolve ( posix . dirname ( normalizedPath ) , normalizedModuleName ) ;
68+ const name = `./${ posix . relative ( normalizedProjectRoot , fullPath ) } .ts` ;
6669 result [ name ] = true ;
6770 }
6871 } ) ;
Original file line number Diff line number Diff line change @@ -26,7 +26,6 @@ export function expectGitToBeClean() {
2626 } ) ;
2727}
2828
29-
3029export function gitCommit ( message : string ) {
3130 return git ( 'add' , '-A' )
3231 . then ( ( ) => git ( 'status' , '--porcelain' ) )
You can’t perform that action at this time.
0 commit comments