mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-09 19:13:08 +00:00
90797: Disable redux devtools in production mode
This commit is contained in:
@@ -87,6 +87,12 @@
|
||||
"maximumWarning": "200kb",
|
||||
"maximumError": "300kb"
|
||||
}
|
||||
],
|
||||
"fileReplacements": [
|
||||
{
|
||||
"replace": "src/config/store/devtools.ts",
|
||||
"with": "src/config/store/devtools.prod.ts"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@@ -52,6 +52,7 @@ import { IdleModalComponent } from './shared/idle-modal/idle-modal.component';
|
||||
|
||||
import { UUIDService } from './core/shared/uuid.service';
|
||||
import { CookieService } from './core/services/cookie.service';
|
||||
import { StoreDevModules } from '../config/store/devtools';
|
||||
|
||||
export function getBase() {
|
||||
return environment.ui.nameSpace;
|
||||
@@ -75,15 +76,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_BASE_HREF,
|
||||
|
4
src/config/store/devtools.prod.ts
Normal file
4
src/config/store/devtools.prod.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
/**
|
||||
* This disabled DevTools in Production mode, overriding the defaults in devtools.ts
|
||||
*/
|
||||
export const StoreDevModules = [];
|
10
src/config/store/devtools.ts
Normal file
10
src/config/store/devtools.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { StoreDevtoolsModule } from '@ngrx/store-devtools';
|
||||
|
||||
export const StoreDevModules = [
|
||||
// This enables Redux DevTools by default.
|
||||
// Note: this is overridden in production by devtools.prod.ts
|
||||
StoreDevtoolsModule.instrument({
|
||||
maxAge: 1000,
|
||||
logOnly: false,
|
||||
})
|
||||
];
|
Reference in New Issue
Block a user