File tree 1 file changed +5
-4
lines changed
packages/@ngtools/webpack/src 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -450,19 +450,20 @@ export class AngularCompilerPlugin implements Tapable {
450
450
. forEach ( lazyRouteKey => {
451
451
const [ lazyRouteModule , moduleName ] = lazyRouteKey . split ( '#' ) ;
452
452
453
- if ( ! lazyRouteModule || ! moduleName ) {
453
+ if ( ! lazyRouteModule ) {
454
454
return ;
455
455
}
456
456
457
- const lazyRouteTSFile = discoveredLazyRoutes [ lazyRouteKey ] ;
457
+ const lazyRouteTSFile = discoveredLazyRoutes [ lazyRouteKey ] . replace ( / \\ / g , '/' ) ;
458
458
let modulePath : string , moduleKey : string ;
459
459
460
460
if ( this . _JitMode ) {
461
461
modulePath = lazyRouteTSFile ;
462
- moduleKey = lazyRouteKey ;
462
+ moduleKey = ` ${ lazyRouteModule } ${ moduleName ? '#' + moduleName : '' } ` ;
463
463
} else {
464
464
modulePath = lazyRouteTSFile . replace ( / ( \. d ) ? \. t s $ / , `.ngfactory.js` ) ;
465
- moduleKey = `${ lazyRouteModule } .ngfactory#${ moduleName } NgFactory` ;
465
+ const factoryModuleName = moduleName ? `#${ moduleName } NgFactory` : '' ;
466
+ moduleKey = `${ lazyRouteModule } .ngfactory${ factoryModuleName } ` ;
466
467
}
467
468
468
469
if ( moduleKey in this . _lazyRoutes ) {
You can’t perform that action at this time.
0 commit comments