Народ,
Подскажите кто работал с dynamic lazy loading.
не могу нагуглить что где смотреть.
Проблема следующая. Есть несколько модулей. Они подтягиваются через loadChildren примерно так :
loadChildren: () => import('./pages/[comp_name]/[comp_name].module').then(m => m.[comp_name]Module),
Есть пару роутов. Один не работает
Во время перехода роута на страницу выкидывает в консоль ошибку
sentry-error-handler.service.ts:39 Error: Uncaught (in promise): Error: Angular JIT compilation failed: '
@angular/compiler' not loaded!
- JIT compilation is discouraged for production use-cases! Consider AOT mode instead.
- Did you bootstrap using '
@angular/platform-browser-dynamic' or '
@angular/platform-server'?
- Alternatively provide the compiler with 'import "
@angular/compiler";' before bootstrapping.
Error: Angular JIT compilation failed: '
@angular/compiler' not loaded!
- JIT compilation is discouraged for production use-cases! Consider AOT mode instead.
- Did you bootstrap using '
@angular/platform-browser-dynamic' or '
@angular/platform-server'?
- Alternatively provide the compiler with 'import "
@angular/compiler";' before bootstrapping.
at getCompilerFacade (core.js:636)
at Function.get (core.js:38878)
at getNgModuleDef (core.js:2199)
at new NgModuleFactory$1 (core.js:36080)
at Compiler_compileModuleSync__POST_R3__ (core.js:40687)
at Compiler_compileModuleAsync__POST_R3__ [as compileModuleAsync] (core.js:40700)
at MergeMapSubscriber.project (router.js:6455)
at MergeMapSubscriber._tryNext (mergeMap.js:46)
at MergeMapSubscriber._next (mergeMap.js:36)
at
MergeMapSubscriber.next (Subscriber.js:49)
at resolvePromise (zone-evergreen.js:798)
at resolvePromise (zone-evergreen.js:750)
at zone-evergreen.js:860
at ZoneDelegate.invokeTask (zone-evergreen.js:399)
at Object.onInvokeTask (core.js:41264)
at ZoneDelegate.invokeTask (zone-evergreen.js:398)
at Zone.runTask (zone-evergreen.js:167)
at drainMicroTaskQueue (zone-evergreen.js:569)
at ZoneTask.invokeTask [as invoke] (zone-evergreen.js:484)
at invokeTask (zone-evergreen.js:1621)