-
Notifications
You must be signed in to change notification settings - Fork 12k
App that has lazy loading modules is not rendering any pages in prod mode after update to angular 8. #14613
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
Comments
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 This might be related to your directory structure so its really important to get an accurate repro to diagnose this. |
@alan-agius4 , sure, I will try to create a reproduction. |
Not sure if it's ngrx library fault or angular-cli. I have made a repro here. |
Hi all, I want to point every one to this issue, as I have seen post in The issue is within Build Optimizer and how we are currently wrapping outputted ES2015 Classes like the below; class CustomComponentEffects {
constructor(_actions) {
this._actions = _actions;
this.doThis = this._actions;
}
}
CustomComponentEffects.decorators = [{ type: Injectable }];
CustomComponentEffects.ctorParameters = () => [{ type: Actions }];
tslib_1.__decorate([
Effect(),
tslib_1.__metadata("design:type", Object)
], CustomComponentEffects.prototype, "doThis", void 0);
tslib_1.__decorate([
Effect({ dispatch: false }),
tslib_1.__metadata("design:type", Object)
], CustomComponentEffects.prototype, "doThat", void 0); There is already a PR for improving the ES2015 class wrapping. Which by coincidence happen to solve this issue as well. #14585 |
@alan-agius4 , very nice, thanks for fixing it :) should I close the issue or should I wait until your PR gets approved? |
Let's leave it open for the time being, it will be autoclosed once the PR get merged. |
…dles wrapping of tslib and tsickle classes Related to ngrx/platform#1905 and ng-packagr/ng-packagr#1307 Fixes #14613
…dles wrapping of tslib and tsickle classes Related to ngrx/platform#1905 and ng-packagr/ng-packagr#1307 Fixes #14613
@alan-agius4 As commented here ng-packagr/ng-packagr#1307 (comment) the problem still exists |
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
Is this a regression?
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
andbuildOptimizer
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
andbuildOptimizer
set to true, after I open the website it navigates me to lazy loaded module url likewebsitename.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 andbuildOptimizer
set to true. If I setbuildOptimizer
to false, everything works fine, but that's not a solution because I need buildOptimizer to be set to true. IfbuildOptimizer
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.🔥 Exception or Error
No errors.
🌍 Your Environment
The text was updated successfully, but these errors were encountered: