Skip to content

Regression? Some effects not working as before in prod mode. #1905

@liesahead

Description

@liesahead

Minimal reproduction of the bug/regression with instructions:

I have a custom library, which contains some global modules, for example AuthModule. Until I have updated my projects to angular 8, everything worked fine. After I did that, most effects in my custom library don't work. Actions are dispatched, reducers are called, but effects.. Not really. However, one effect is called and it returns another action, which is not dispatched for some reason.

This happens only in production build AND with buildOptimizer set to true. if buildOptimizer is disabled, then everything works as expected. Also, I have created an issue here, because I don't know if it's ngrx bug or angular-cli:

angular/angular-cli#14613

Expected behavior:

Versions of NgRx, Angular, Node, affected browser(s) and operating system(s):

Angular CLI: 8.0.1
Node: 10.7.0
OS: win32 x64
Angular: 8.0.0
... animations, cdk, common, compiler, compiler-cli, core, forms
... language-service, material, platform-browser
... platform-browser-dynamic, router

Package Version

@ngrx/core: ^1.2.0
@ngrx/effects: ^7.4.0
@ngrx/entity: ^7.4.0
@ngrx/router-store: ^7.4.0
@ngrx/store: ^7.4.0

@angular-devkit/architect 0.800.1
@angular-devkit/build-angular 0.800.1
@angular-devkit/build-ng-packagr 0.800.1
@angular-devkit/build-optimizer 0.800.1
@angular-devkit/build-webpack 0.800.1
@angular-devkit/core 8.0.1
@angular-devkit/schematics 8.0.1
@angular/cli 8.0.1
@angular/flex-layout 8.0.0-beta.26
@ngtools/json-schema 1.1.0
@ngtools/webpack 8.0.1
@schematics/angular 8.0.1
@schematics/update 0.800.1
ng-packagr 5.2.0
rxjs 6.5.2
typescript 3.4.5
webpack 4.30.0

I would be willing to submit a PR to fix this issue

[ ] Yes (Assistance is provided if you need help submitting a pull request)
[ X ] No

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions