From 7b12bd6cce8b557068b3f461b842b533d3356ca0 Mon Sep 17 00:00:00 2001 From: Tobias Mahnke Date: Tue, 20 Apr 2021 17:40:41 +0200 Subject: [PATCH] fix: only load redux dev tools in dev --- frontend/package.json | 2 +- frontend/src/store.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/package.json b/frontend/package.json index c59b4cd..4b7c518 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -39,7 +39,7 @@ "prettier" ], "rules": { - "prettier/prettier": "error", + "prettier/prettier": "warn", "standard/array-bracket-even-spacing": 0, "standard/computed-property-even-spacing": 0, "standard/object-curly-even-spacing": 0 diff --git a/frontend/src/store.ts b/frontend/src/store.ts index 39d03f9..e2e9b33 100644 --- a/frontend/src/store.ts +++ b/frontend/src/store.ts @@ -9,7 +9,8 @@ declare global { } } -const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose; +const composeEnhancers = + (process.env.NODE_ENV !== 'production' && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__) || compose; export const store = createStore( rootReducer,