Skip to content

Commit

Permalink
Disable RTK enhancers in prod
Browse files Browse the repository at this point in the history
  • Loading branch information
vicb committed May 2, 2024
1 parent a7b55be commit 01daa2e
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions apps/fxc-front/src/app/redux/store.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ThunkAction } from 'redux-thunk';

import { Action, combineReducers, configureStore } from '@reduxjs/toolkit';
import { Action, DevToolsEnhancerOptions, combineReducers, configureStore } from '@reduxjs/toolkit';

import * as airspace from './airspace-slice';
import * as app from './app-slice';
Expand Down Expand Up @@ -30,14 +30,20 @@ const rootReducer = combineReducers({
skyways: skyways.reducer,
});

const devTools: DevToolsEnhancerOptions | boolean = import.meta.env.PROD
? false
: {
traceLimit: 20,
trace: false,
autoPause: true,
};

import.meta.env.PROD;

export const store = configureStore({
reducer: rootReducer,
middleware: (getDefaultMiddleware) => getDefaultMiddleware({ serializableCheck: false, immutableCheck: false }),
devTools: {
traceLimit: 20,
trace: false,
autoPause: true,
},
devTools,
});

liveTrack.handleVisibility();
Expand Down

0 comments on commit 01daa2e

Please sign in to comment.