Skip to content

Commit

Permalink
removing redux-logger from production build
Browse files Browse the repository at this point in the history
  • Loading branch information
Karthick-Ramanathan committed Jul 28, 2020
1 parent 1cfc2fa commit 4061543
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/redux/store.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import { createStore, applyMiddleware } from 'redux'
import { createStore, applyMiddleware, Middleware } from 'redux'
import logger from 'redux-logger'
import { persistStore } from 'redux-persist'

import rootReducer from './root-reducer'

const middlewares = [logger]
const middlewares: Middleware[] = []

if (process.env.NODE_ENV === 'development') {
middlewares.push(logger)
}

const store = createStore(
rootReducer,
Expand Down

0 comments on commit 4061543

Please sign in to comment.