mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-14 13:33:03 +00:00
fix AoT issues with store devtools
This commit is contained in:
@@ -45,10 +45,7 @@ export function getMetaReducers(config: GlobalConfig): Array<MetaReducer<AppStat
|
||||
return config.debug ? [...metaReducers, ...debugMetaReducers] : metaReducers;
|
||||
}
|
||||
|
||||
const DEV_MODULES: any[] = [];
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
const IMPORTS = [
|
||||
CommonModule,
|
||||
SharedModule,
|
||||
HttpClientModule,
|
||||
@@ -58,14 +55,17 @@ const DEV_MODULES: any[] = [];
|
||||
TranslateModule.forRoot(),
|
||||
EffectsModule.forRoot(appEffects),
|
||||
StoreModule.forRoot(appReducers),
|
||||
StoreDevtoolsModule.instrument({
|
||||
maxAge: 25, // Retains last 25 states
|
||||
logOnly: getConfig().production, // Restrict extension to log-only mode
|
||||
}),
|
||||
StoreRouterConnectingModule,
|
||||
...DEV_MODULES
|
||||
],
|
||||
providers: [
|
||||
];
|
||||
|
||||
IMPORTS.push(
|
||||
StoreDevtoolsModule.instrument({
|
||||
maxAge: 100,
|
||||
logOnly: ENV_CONFIG.production,
|
||||
})
|
||||
);
|
||||
|
||||
const PROVIDERS = [
|
||||
{
|
||||
provide: GLOBAL_CONFIG,
|
||||
useFactory: (getConfig)
|
||||
@@ -83,16 +83,34 @@ const DEV_MODULES: any[] = [];
|
||||
provide: RouterStateSerializer,
|
||||
useClass: DSpaceRouterStateSerializer
|
||||
}
|
||||
],
|
||||
declarations: [
|
||||
];
|
||||
|
||||
const DECLARATIONS = [
|
||||
AppComponent,
|
||||
HeaderComponent,
|
||||
FooterComponent,
|
||||
PageNotFoundComponent,
|
||||
NotificationComponent,
|
||||
NotificationsBoardComponent
|
||||
];
|
||||
|
||||
const EXPORTS = [
|
||||
AppComponent
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
...IMPORTS
|
||||
],
|
||||
exports: [AppComponent]
|
||||
providers: [
|
||||
...PROVIDERS
|
||||
],
|
||||
declarations: [
|
||||
...DECLARATIONS
|
||||
],
|
||||
exports: [
|
||||
...EXPORTS
|
||||
]
|
||||
})
|
||||
export class AppModule {
|
||||
|
||||
|
Reference in New Issue
Block a user