Commit f8ad0457 authored by David Burke's avatar David Burke

Remove devtools when using prod build

parent bc53bef4
Pipeline #37848454 passed with stages
in 6 minutes and 13 seconds
......@@ -52,6 +52,10 @@
{
"replace": "src/polyfills.ts",
"with": "src/polyfills.ext.ts"
},
{
"replace": "src/app/store-devtools.ts",
"with": "src/app/store-devtools.prod.ts"
}
]
},
......
/*
* @angular
*/
* @angular
*/
import { APP_BASE_HREF } from "@angular/common";
import { HttpClientModule, HTTP_INTERCEPTORS } from "@angular/common/http";
import { NgModule, ErrorHandler } from "@angular/core";
......@@ -13,20 +13,19 @@ import { environment } from "../environments/environment";
import { routing, routingStore } from "./app.routing";
/*
* Third Party Other
*/
* Third Party Other
*/
import { EffectsModule } from "@ngrx/effects";
import { RouterStateSerializer } from "@ngrx/router-store";
import { StoreModule } from "@ngrx/store";
import { StoreDevtoolsModule } from "@ngrx/store-devtools";
import { InlineSVGModule } from "ng-inline-svg";
import { SelectModule } from "ng-select";
import { TooltipModule } from "ngx-tooltip";
import { HotkeyModule } from "angular2-hotkeys";
/*
* Passit
*/
* Passit
*/
import { AccountModule } from "./account";
import { MoonMail } from "./account/moonmail/moonmail.service";
import { AppComponent } from "./app.component";
......@@ -57,6 +56,7 @@ import { AppDataService } from "./shared/app-data/app-data.service";
import { PopupLoggedInGuard } from "./guards/popup-logged-in.guard";
import { RavenErrorHandler } from "./error-handler";
import { AuthInterceptor } from "./api/auth.interceptor";
import { devtoolsModule } from "./store-devtools";
// Why is this not default ngrx store, why is crashing default?
export interface IRouterStateUrl {
......@@ -93,9 +93,7 @@ export class CustomSerializer
AccountModule,
StoreModule.forRoot(reducers, { metaReducers }),
EffectsModule.forRoot([SecretEffects, GetConfEffects]),
!environment.production
? StoreDevtoolsModule.instrument({ maxAge: 25 })
: [],
devtoolsModule,
FormsModule,
GroupModule,
ListModule,
......
export const devtoolsModule = [];
// This is set in this file so that it can be removed when building for production
import { StoreDevtoolsModule } from '@ngrx/store-devtools';
export const devtoolsModule = StoreDevtoolsModule.instrument({maxAge: 25});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment