Merge pull request #1599 from atmire/w2p-90797_issue-1430_redux-devtools-disable-support-in-prod-mode

Disable redux devtools support in prod mode
This commit is contained in:
Tim Donohue
2022-04-20 09:06:15 -05:00
committed by GitHub
4 changed files with 25 additions and 8 deletions

View File

@@ -8,7 +8,6 @@ import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { EffectsModule } from '@ngrx/effects';
import { RouterStateSerializer, StoreRouterConnectingModule } from '@ngrx/router-store';
import { MetaReducer, Store, StoreModule, USER_PROVIDED_META_REDUCERS } from '@ngrx/store';
import { StoreDevtoolsModule } from '@ngrx/store-devtools';
import {
DYNAMIC_ERROR_MESSAGES_MATCHER,
DYNAMIC_MATCHER_PROVIDERS,
@@ -61,6 +60,8 @@ import { ThemedAdminSidebarComponent } from './admin/admin-sidebar/themed-admin-
import { APP_CONFIG, AppConfig } from '../config/app-config.interface';
import { NgxMaskModule } from 'ngx-mask';
import { StoreDevModules } from '../config/store/devtools';
export function getConfig() {
return environment;
}
@@ -96,15 +97,9 @@ const IMPORTS = [
StoreModule.forRoot(appReducers, storeModuleConfig),
StoreRouterConnectingModule.forRoot(),
ThemedEntryComponentModule.withEntryComponents(),
StoreDevModules,
];
IMPORTS.push(
StoreDevtoolsModule.instrument({
maxAge: 1000,
logOnly: environment.production,
})
);
const PROVIDERS = [
{
provide: APP_CONFIG,