old_contents: import { createStore, applyMiddleware, compose } from 'redux'
  import promiseMiddleware from 'redux-promise'
  import rootReducer from '../reducers'
  import createLogger from 'redux-logger'
  import { compact } from 'lodash'
  import { serverLogger, apiMiddleware, cacheMiddleware, pendingPromiseMiddleware } from '../middleware'
  
  export function configureStore (initialState, req) {
    const isServer = typeof window === 'undefined'
  
    var middleware = compact([
      isServer && serverLogger,
      cacheMiddleware,
      apiMiddleware(req),
      pendingPromiseMiddleware,
      promiseMiddleware,
      !isServer && createLogger({collapsed: true})
    ])
  
    const store = compose(
      applyMiddleware(...middleware)
    )(createStore)(rootReducer, initialState)
  
    if (module.onReload) {
      module.onReload(() => {
        const nextRootReducer = require('../reducers/index')
        store.replaceReducer(nextRootReducer)
        return true
      })
    }
  
    return store
  }
  
new_contents: import { createStore, applyMiddleware, compose } from 'redux'
  import promiseMiddleware from 'redux-promise'
  import rootReducer from '../reducers'
  import createLogger from 'redux-logger'
  import { compact } from 'lodash'
  import { serverLogger, apiMiddleware, cacheMiddleware, pendingPromiseMiddleware } from '../middleware'
  
  export function configureStore (initialState, req) {
    const isServer = typeof window === 'undefined'
  
    var middleware = compact([
      isServer && serverLogger,
      cacheMiddleware,
      apiMiddleware(req),
      pendingPromiseMiddleware,
      promiseMiddleware,
      !isServer && createLogger({collapsed: true})
    ])
  
    const store = compose(
      applyMiddleware(...middleware),
      !isServer && typeof window.devToolsExtension !== 'undefined' ? window.devToolsExtension() : f => f
    )(createStore)(rootReducer, initialState)
  
    if (module.onReload) {
      module.onReload(() => {
        const nextRootReducer = require('../reducers/index')
        store.replaceReducer(nextRootReducer)
        return true
      })
    }
  
    return store
  }
  
subject: support redux dev tools chrome extension