Angular-cli: Lazy Loading not creating bundles

Created on 28 Oct 2016  路  12Comments  路  Source: angular/angular-cli

OS?

OSX El Capitan

Versions.

angular-cli: 1.0.0-beta.18
node: 6.7.0
os: darwin x64

Repro steps.

configure routing module and lazy load another module via route.
verify that two bundles are being created
Install a dependency from github. ex github:username/cool-module
Import module for that dependency into the root module.
verify that the one a SINGLE bundle is being created.

Mention any other details that might be useful.

I tried to be as detailed here as I could. When I have time I will create a public repo to reproduce if this is not sufficient.

investigation 1 (urgent)

Most helpful comment

For me the Bundles for lazy load Routing modules are not getting created. It only creates a main chunk and not any module chunks.

All 12 comments

For me the Bundles for lazy load Routing modules are not getting created. It only creates a main chunk and not any module chunks.

I have the same issue. I have updated my app to angular-cli beta18 (from beta16), and my extra chunks are not created anymore, but they are included inside the main bundle file.
Any ideas ?

I have been digging into it more. Still haven't identified an exact cause. I am trying to break it down to as small an example as I can. I looked through the cli code but I couldn't find anything that jumps our as a culprit. Will update issue when I find something.

Is this duplicate with #2496?

I've got two projects, a new project (just started 2 weeks ago) and it's generating chunks. An older project, which is bigger, doesn't generate any chunks and I'm sure my lazy loading modules are not imported anywhere using import{} statement.

As a test, I've added an empty module to that project, lazy loading it from the root module, and still no chunks.

For me the issue seems to be..

https://github.com/angular/angular-cli/issues/2496#issuecomment-252155012

having the same issue here... when trying to lazy-load a module the CLI is not generating the bundle for that module. I'm using version 1.0.0-beta.19-3 of angular-cli

@filipesilva Do you have any update on this? Or anyone found any workaround?

@filipesilva having same issue.

@a5hik have you tried this workaround https://github.com/angular/angular-cli/issues/2496#issuecomment-259926983 ?

I'm sorry but I don't have an update, no. It's on the shortlist of stuff that needs to be looked into for RC1. I'm closing in favor of https://github.com/angular/angular-cli/issues/2496 as it seems to be the same.

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JanStureNielsen picture JanStureNielsen  路  3Comments

naveedahmed1 picture naveedahmed1  路  3Comments

delasteve picture delasteve  路  3Comments

NCC1701M picture NCC1701M  路  3Comments

brtnshrdr picture brtnshrdr  路  3Comments