You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
App that has lazy loading modules is not rendering any pages in prod mode after update to angular 8. #14613
Probably, this bug has never occurred before updating to angular 8 and "@angular-devkit/build-angular": "^0.800.0"
The previous version in which this bug was not present was: "@angular-devkit/build-angular": "^0.13.9"
Description
App is not rendering any pages in prod mode when it's built with aot and buildOptimizer enabled. It just fetches all scripts that are needed and fetching data from server, but not rendering the page after that.
1. With buildOptimizer set to false this problem doesn't occur.
2. If app doesn't have lazy loaded modules, even with buildOptimizer set to true everything works as expected.
When project is built with aot and buildOptimizer set to true, after I open the website it navigates me to lazy loaded module url like websitename.com/lazy-loaded and after that it just stays still.
🔬 Minimal Reproduction
Create an application with lazy loaded modules. And build this app in prod mode with aot set to true and buildOptimizer set to true. If I set buildOptimizer to false, everything works fine, but that's not a solution because I need buildOptimizer to be set to true. If buildOptimizer is set to true, then app is loading files and stops loading further, it navigates to needed route, but not rendering the component.
IMPORTANT
If app doesn't have any lazy loaded modules (very simple app), then it works fine even when buildOptimizer set to true.
changed the title [-]App in prod mode is not rendering any pages after update to angular 8.[/-][+]App that has lazy loading modules, is not rendering any pages in prod mode after update to angular 8.[/+]on May 31, 2019
changed the title [-]App that has lazy loading modules, is not rendering any pages in prod mode after update to angular 8.[/-][+]App that has lazy loading modules is not rendering any pages in prod mode after update to angular 8.[/+]on May 31, 2019
This seems like a bug but we'll need to look at a reproduction to find and fix the problem. Can you setup a minimal repro please?
You can read here why this is needed. A good way to make a minimal repro is to create a new app via ng new repro-app and adding the minimum possible code to show the problem. Then you can push this repository to github and link it here.
This might be related to your directory structure so its really important to get an accurate repro to diagnose this.
Activity
[-]App in prod mode is not rendering any pages after update to angular 8.[/-][+]App that has lazy loading modules, is not rendering any pages in prod mode after update to angular 8.[/+][-]App that has lazy loading modules, is not rendering any pages in prod mode after update to angular 8.[/-][+]App that has lazy loading modules is not rendering any pages in prod mode after update to angular 8.[/+]alan-agius4 commentedon May 31, 2019
This seems like a bug but we'll need to look at a reproduction to find and fix the problem. Can you setup a minimal repro please?
You can read here why this is needed. A good way to make a minimal repro is to create a new app via
ng new repro-appand adding the minimum possible code to show the problem. Then you can push this repository to github and link it here.This might be related to your directory structure so its really important to get an accurate repro to diagnose this.
liesahead commentedon May 31, 2019
@alan-agius4 , sure, I will try to create a reproduction.
liesahead commentedon Jun 4, 2019
Not sure if it's ngrx library fault or angular-cli. I have made a repro here.
ngrx/platform#1905
alan-agius4 commentedon Jun 5, 2019
Hi all, I want to point every one to this issue, as I have seen post in
NGRXandng-packagrreported for the same issue.The issue is within Build Optimizer and how we are currently wrapping outputted ES2015 Classes like the below;
There is already a PR for improving the ES2015 class wrapping. Which by coincidence happen to solve this issue as well. #14585
liesahead commentedon Jun 5, 2019
@alan-agius4 , very nice, thanks for fixing it :) should I close the issue or should I wait until your PR gets approved?
alan-agius4 commentedon Jun 5, 2019
Let's leave it open for the time being, it will be autoclosed once the PR get merged.
test: add test to verify that the new es2015 class wrapping logic han…
test: add test to verify that the new es2015 class wrapping logic han…
paulstelzer commentedon Aug 11, 2019
@alan-agius4 As commented here ng-packagr/ng-packagr#1307 (comment) the problem still exists
angular-automatic-lock-bot commentedon Sep 13, 2019
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.
test: add test to verify that the new es2015 class wrapping logic han…