-
Notifications
You must be signed in to change notification settings - Fork 12k
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
Dynamic Imports broken when pointing at a barrel file #14399
Comments
@filipesilva Can we bump this to a The migration will have dynamic imports everywhere and lots of users may encounter this after that. Also, Nx has a fair amount of users which would all encounter this. |
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. |
🐞 Bug report
Command (mark with an
x
)[x] build --aot
[x] serve --aot
Is this a regression?
Sort of, using a loadChildren string works. But Dynamic imports which are supposed to be a drop in replacement, do not work.
Description
When a loadChildren callback uses a dynamic import to bring in a lazy loaded module from a barrel file, the path gets changed to
./path-to-barrel.ngfactory
in AoT. Which does not work.🔬 Minimal Reproduction
https://github.com/FrozenPandaz/angular-bugs/tree/dyna-imp-bug
🔥 Exception or Error
Module not found: Error: Can't resolve './shared.ngfactory' in '/home/jason/projects/temp/test-proj/src/app'
The src is
🌍 Your Environment
Latest rc
Anything else relevant?
This is important for Nx, which has public apis for its libs.
The text was updated successfully, but these errors were encountered: