@@ -756,39 +756,36 @@ export class AngularCompilerPlugin {
756
756
return result ;
757
757
}
758
758
759
- return this . done . then (
760
- ( ) => {
761
- // This folder does not exist, but we need to give webpack a resource.
762
- // TODO: check if we can't just leave it as is (angularCoreModuleDir).
763
- result . resource = path . join ( this . _basePath , '$$_lazy_route_resource' ) ;
764
- // tslint:disable-next-line:no-any
765
- result . dependencies . forEach ( ( d : any ) => d . critical = false ) ;
766
- // tslint:disable-next-line:no-any
767
- result . resolveDependencies = ( _fs : any , options : any , callback : Callback ) => {
768
- const dependencies = Object . keys ( this . _lazyRoutes )
769
- . map ( ( key ) => {
770
- const modulePath = this . _lazyRoutes [ key ] ;
771
- if ( modulePath !== null ) {
772
- const name = key . split ( '#' ) [ 0 ] ;
773
-
774
- return new this . _contextElementDependencyConstructor ( modulePath , name ) ;
775
- } else {
776
- return null ;
777
- }
778
- } )
779
- . filter ( x => ! ! x ) ;
780
-
781
- if ( this . _options . nameLazyFiles ) {
782
- options . chunkName = '[request]' ;
759
+ await this . done ;
760
+
761
+ // This folder does not exist, but we need to give webpack a resource.
762
+ // TODO: check if we can't just leave it as is (angularCoreModuleDir).
763
+ result . resource = path . join ( this . _basePath , '$$_lazy_route_resource' ) ;
764
+ // tslint:disable-next-line:no-any
765
+ result . dependencies . forEach ( ( d : any ) => d . critical = false ) ;
766
+ // tslint:disable-next-line:no-any
767
+ result . resolveDependencies = ( _fs : any , options : any , callback : Callback ) => {
768
+ const dependencies = Object . keys ( this . _lazyRoutes )
769
+ . map ( ( key ) => {
770
+ const modulePath = this . _lazyRoutes [ key ] ;
771
+ if ( modulePath !== null ) {
772
+ const name = key . split ( '#' ) [ 0 ] ;
773
+
774
+ return new this . _contextElementDependencyConstructor ( modulePath , name ) ;
775
+ } else {
776
+ return null ;
783
777
}
778
+ } )
779
+ . filter ( x => ! ! x ) ;
784
780
785
- callback ( null , dependencies ) ;
786
- } ;
781
+ if ( this . _options . nameLazyFiles ) {
782
+ options . chunkName = '[request]' ;
783
+ }
787
784
788
- return result ;
789
- } ,
790
- ( ) => undefined ,
791
- ) ;
785
+ callback ( null , dependencies ) ;
786
+ } ;
787
+
788
+ return result ;
792
789
} ) ;
793
790
} ) ;
794
791
}
0 commit comments