fix: only load redux dev tools in dev

This commit is contained in:
Tobias Mahnke 2021-04-20 17:40:41 +02:00
parent 1bd71fd953
commit 7b12bd6cce
2 changed files with 3 additions and 2 deletions

View file

@ -39,7 +39,7 @@
"prettier" "prettier"
], ],
"rules": { "rules": {
"prettier/prettier": "error", "prettier/prettier": "warn",
"standard/array-bracket-even-spacing": 0, "standard/array-bracket-even-spacing": 0,
"standard/computed-property-even-spacing": 0, "standard/computed-property-even-spacing": 0,
"standard/object-curly-even-spacing": 0 "standard/object-curly-even-spacing": 0

View file

@ -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( export const store = createStore(
rootReducer, rootReducer,