/**
 * Create the store with asynchronously loaded reducers
 */

import { createStore, applyMiddleware, compose } from 'redux';
import { fromJS } from 'immutable';
import { routerMiddleware } from 'react-router-redux';
import createSagaMiddleware from 'redux-saga';
import createReducer from './reducers';

const sagaMiddleware = createSagaMiddleware();
const devtools = window.devToolsExtension || (() => noop => noop);

export default function configureStore(initialState = {}, history) {
  // Create the store with two middlewares
  // 1. sagaMiddleware: Makes redux-sagas work
  // 2. routerMiddleware: Syncs the location/URL path to the state
  const middlewares = [
    sagaMiddleware,
    routerMiddleware(history),
  ];

  const enhancers = [
    applyMiddleware(...middlewares),
    devtools(),
  ];

  const store = createStore(
    createReducer(),
    fromJS(initialState),
    compose(...enhancers)
  );

  // Create hook for async sagas
  store.runSaga = sagaMiddleware.run;

  // Make reducers hot reloadable, see http://mxs.is/googmo
  /* istanbul ignore next */
  if (module.hot) {
    module.hot.accept('./reducers', () => {
      const nextRootReducer = require('./reducers').default; // eslint-disable-line global-require
      store.replaceReducer(nextRootReducer);
    });
  }

  // Initialize it with no other reducers
  store.asyncReducers = {};
  return store;
}

@@ -1100,41 +1100,55 @@
     
-module.hot.accept('./reducers', (
+System.import('./reducers').then((reducerModule
 ) =%3E
@@ -1166,94 +1166,112 @@
 nst 
-nextRoot
+create
 Reducer
+s
  = re
-quire('./reducers').default; // eslint-disable-line global-require
+ducerModule.default;%0A      const nextReducers = createReducers(store.asyncReducers);%0A
 %0A   
@@ -1303,18 +1303,15 @@
 extR
-ootR
 educer
+s
 );%0A 

Update internal store template