Repo that shows the error.
https://github.com/bjornharvold/ngrx-prod-issue
Have spent the whole day trying to figure out why ngrx is not working when building a production bundle. I have a working SPA w ngrx working in production but I cannot deploy an update because the new version doesn't work and I cannot figure out what it is.
I've stripped down the project and put it in the repo above. Please advise.
Angular CLI: 8.3.20
Node: 12.13.1
OS: darwin x64
Angular: 8.2.14
... animations, common, compiler, compiler-cli, core, elements
... forms, language-service, platform-browser
... platform-browser-dynamic, router, service-worker
@angular-devkit/architect 0.803.20
@angular-devkit/build-angular 0.803.20
@angular-devkit/build-ng-packagr 0.803.20
@angular-devkit/build-optimizer 0.803.20
@angular-devkit/build-webpack 0.803.20
@angular-devkit/core 8.3.20
@angular-devkit/schematics 8.3.20
@angular/cdk 8.2.3
@angular/cli 8.3.20
@angular/flex-layout 8.0.0-beta.27
@angular/material 8.2.3
@angular/pwa 0.803.20
@ngtools/webpack 8.3.20
@schematics/angular 8.3.20
@schematics/update 0.803.20
ng-packagr 5.7.1
rxjs 6.5.3
typescript 3.5.3
webpack 4.39.2
ngrx 8.5.2
[ ] Yes (Assistance is provided if you need help submitting a pull request)
[x] No

Hi, my platform in production is experiencing the same issue. Could it be a dependency of a library that changed?
Confirming the issue
Is there a dependency that is updated recently @bjornharvold?
Seems related to ofType, leave these out and it does work ... not sure why.
Also having the same issue with our prod build. Looks like an action string is triggering the 'not a function' error

This was a bug in an upstream package that has been fixed. Pin the terser package to 4.4.0 or 4.4.2 as a workaround.
@brandonroberts Great detective work!! My eyes were burning last night after having tried to resolve this one. How did you figure this one out? Yes, @timdeschryver - the only dep update was Angular CLI 8.3.20.
馃槈 Whenever I see errors that point back to build optimizer, its usually an upstream issue with the CLI, as we haven't changed the way we package and distribute the libraries. I reached out to the CLI team, and they pointed me to the cause.
Most helpful comment
馃槈 Whenever I see errors that point back to build optimizer, its usually an upstream issue with the CLI, as we haven't changed the way we package and distribute the libraries. I reached out to the CLI team, and they pointed me to the cause.