In production @ngrx/store-devtools
should be completly removed from the bundle.
Let’s see an example:
Start a new angular application
Populate your state
Examine the state
If you have the Redux dev tools installed you can now examine your state.
Problem examine state in Production
It’s best to disable redux dev tools in production.
Redux dev tools still works in production
Solution 1
If on production do not place the StoreDevtoolsModule.instrument
in the imports array.
add a production
key to the environments files:
Problem
@ngrx/store-devtools
is still in the bundle
it will add around 16kb
of unused code to your bundle.
Replace app.module.ts
We can achieve the same result with fileReplacement
.
@ngrx/store-devtools
is completly removed from the bundle.