Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

Lazy loading not working #1

Closed
StasD opened this issue Jun 1, 2017 · 2 comments
Closed

Lazy loading not working #1

StasD opened this issue Jun 1, 2017 · 2 comments

Comments

@StasD
Copy link

StasD commented Jun 1, 2017

Hello,

So, are you saying that when you run "npm run build-prod" for this project, it actually produces a separate chunk for the PrivateModule module? Because I cloned it to check just that, and this does not work for me...

I was just trying to get lazy loading with AoT work for my project, so far without success (that is, no additional chunks), so I found this your project, but as I said, I'm getting the very same result: no chunks for lazy loaded modules... Very weird...

Using macOS Sierra here with Node v6.10.3. Everything else seems to be coming from "npm install".

@BrainCrumbz
Copy link
Owner

BrainCrumbz commented Jun 1, 2017

Hi there. Thanks for trying this out.

tl; dr;

Comment out the part using ContextReplacementPlugin in webpack.config.prod.js

Full story

This project is an attempt to hit that target, so having lazy loaded modules working with ngtools/webpack AOT build.

We hit some roadblocks, mainly with ngtools/webpack issues. The last one is tracked by this couple of issues in angular-cli project:

The workaround for now, as suggested by angular-cli people, is to comment out that plugin. Actually we're going to update this project with that workaround shortly.

HTH

@BrainCrumbz
Copy link
Owner

This has been fixed (with mentioned workaround) by 68e06e9

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants