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 @@ -449,19 +449,20 @@ export class AngularCompilerPlugin implements Tapable {
449
449
. forEach ( lazyRouteKey => {
450
450
const [ lazyRouteModule , moduleName ] = lazyRouteKey . split ( '#' ) ;
451
451
452
- if ( ! lazyRouteModule || ! moduleName ) {
452
+ if ( ! lazyRouteModule ) {
453
453
return ;
454
454
}
455
455
456
- const lazyRouteTSFile = discoveredLazyRoutes [ lazyRouteKey ] ;
456
+ const lazyRouteTSFile = discoveredLazyRoutes [ lazyRouteKey ] . replace ( / \\ / g , '/' ) ;
457
457
let modulePath : string , moduleKey : string ;
458
458
459
459
if ( this . _JitMode ) {
460
460
modulePath = lazyRouteTSFile ;
461
- moduleKey = lazyRouteKey ;
461
+ moduleKey = ` ${ lazyRouteModule } ${ moduleName ? '#' + moduleName : '' } ` ;
462
462
} else {
463
463
modulePath = lazyRouteTSFile . replace ( / ( \. d ) ? \. t s $ / , `.ngfactory.js` ) ;
464
- moduleKey = `${ lazyRouteModule } .ngfactory#${ moduleName } NgFactory` ;
464
+ const factoryModuleName = moduleName ? `#${ moduleName } NgFactory` : '' ;
465
+ moduleKey = `${ lazyRouteModule } .ngfactory${ factoryModuleName } ` ;
465
466
}
466
467
467
468
if ( moduleKey in this . _lazyRoutes ) {
You can’t perform that action at this time.
0 commit comments