mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
redux: do not use redux logger middleware in production builds
This commit is contained in:
parent
035b0ab07a
commit
5c58a7d7f4
@ -13,5 +13,11 @@ export let store;
|
|||||||
|
|
||||||
export function configureStore() {
|
export function configureStore() {
|
||||||
const composeEnhancers = (window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
|
const composeEnhancers = (window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
|
||||||
store = createStore(rootReducer, {}, composeEnhancers(applyMiddleware(thunk, createLogger())));
|
|
||||||
|
if (process.env.NODE_ENV !== 'production') {
|
||||||
|
// DEV builds we had the logger middleware
|
||||||
|
store = createStore(rootReducer, {}, composeEnhancers(applyMiddleware(thunk, createLogger())));
|
||||||
|
} else {
|
||||||
|
store = createStore(rootReducer, {}, composeEnhancers(applyMiddleware(thunk)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user