-
Notifications
You must be signed in to change notification settings - Fork 26.2k
Move NgModuleFactoryLoader from core to router #23796
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@dawidgarus ... we use |
@mlc-mlapis May I ask where? I didn't find any reference to |
@dawidgarus ... ah, my comment was that we use them in our own code - we import them from And |
Thank you for the issue. However, these are consumed by the router, but can also be consumed by applications, and are a piece of core functionality. Therefore they should stay in |
@dawidgarus ... I read your arguments why you have a problem with |
@jasonaden If it's a core functionality, why do You have to import RouterModule to use it? To me, core functionality is something that is required for framework to work and it's not. It's just extra feature. Move it to separate package then, maybe '@angular/core/factory-loader` or something. @mlc-mlapis in angular-cli issue referenced it's explained why. TL;DR version is that module which contains |
@dawidgarus ... so 2 questions:
|
@mlc-mlapis |
@dawidgarus ... hmm, thanks for additional info. We don't use Webpack so that's why the questions. |
@jasonaden Anything being platform-independent would only consume abstract |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
I'm submitting a...
Current behavior
NgModuleFactoryLoader
andSystemJsNgModuleLoader
are defined in @angular/coreExpected behavior
They should be defined in @angular/router or other module.
Minimal reproduction of the problem with instructions
N/A
What is the motivation / use case for changing the behavior?
NgModuleFactoryLoader
is not used anywhere in core or in any module other than routerNgModuleFactoryLoader
is provided in routerDllPlugin
with@ngtools/webpack
. See this issue: @ngtools/webpack :: Lazy Loaded Routes Not Built In Build With DLL Bundles angular-cli#4565.Currently
@angular/core
cannot be compiled separately from main app bundle as dll, because lazy loading chunks are not generated then. And because everything depends on@angular/core
, all angular packages cannot be in dll. IfSystemJsNgModuleLoader
was in@angular/router
, all other angular packages could be included in dll.Environment
The text was updated successfully, but these errors were encountered: