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",
|
"maximumWarning": "200kb",
|
||||||
"maximumError": "300kb"
|
"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 { UUIDService } from './core/shared/uuid.service';
|
||||||
import { CookieService } from './core/services/cookie.service';
|
import { CookieService } from './core/services/cookie.service';
|
||||||
|
import { StoreDevModules } from '../config/store/devtools';
|
||||||
|
|
||||||
export function getBase() {
|
export function getBase() {
|
||||||
return environment.ui.nameSpace;
|
return environment.ui.nameSpace;
|
||||||
@@ -75,15 +76,9 @@ const IMPORTS = [
|
|||||||
StoreModule.forRoot(appReducers, storeModuleConfig),
|
StoreModule.forRoot(appReducers, storeModuleConfig),
|
||||||
StoreRouterConnectingModule.forRoot(),
|
StoreRouterConnectingModule.forRoot(),
|
||||||
ThemedEntryComponentModule.withEntryComponents(),
|
ThemedEntryComponentModule.withEntryComponents(),
|
||||||
|
StoreDevModules,
|
||||||
];
|
];
|
||||||
|
|
||||||
IMPORTS.push(
|
|
||||||
StoreDevtoolsModule.instrument({
|
|
||||||
maxAge: 1000,
|
|
||||||
logOnly: environment.production,
|
|
||||||
})
|
|
||||||
);
|
|
||||||
|
|
||||||
const PROVIDERS = [
|
const PROVIDERS = [
|
||||||
{
|
{
|
||||||
provide: APP_BASE_HREF,
|
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