-
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
namedChunks is not honored for lazy-loading routes with import syntax #14251
Comments
Tried poking around in the webpack internals to see if we could make it auto-name |
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
)Is this a regression?
This only occurs with the new
import
syntax for lazy-loadingDescription
If a project uses routes with the new
import
syntax for lazy-loading then building withng build --prod --named-chunks
donesn't produce chunks with proper names.🔬 Minimal Reproduction
See https://github.com/cexbrayat/named-chunks if you want to give it a try or do as follow:
Update app.component.html with:
Update app.module.ts with:
and admin.module.ts with:
Then run
ng build --named-chunks --prod
🔥 Exception or Error
The command gives:
instead of the expected:
that you can obtain using
path: '', loadChildren: './admin/admin.module#AdminModule'
for the route declaration.🌍 Your Environment
Anything else relevant?
ng serve
is also affected.The text was updated successfully, but these errors were encountered: