<commit_before>import { createStore, combineReducers, compose, applyMiddleware } from 'redux';
import { routerReducer } from 'react-router-redux';
import createLogger from 'redux-logger';
import createSagaMiddleware from 'redux-saga';

import * as reducers from './../reducers/reducers';
import rootSaga from './../sagas/sagas';


// Reducers
const reducer = combineReducers({
  ...reducers,
  routing: routerReducer,
});


const configureStore = () => {
  const sagaMiddleware = createSagaMiddleware();
  const middlewares    = [sagaMiddleware];

  // Conditionally apply logging middlware when not in production
  if (process.env.NODE_ENV !== 'production') middlewares.push(createLogger());

  // Hot reload for devTool
  const enhancer = compose(
    applyMiddleware(...middlewares),
    window.devToolsExtension && window.devToolsExtension(),
  );

  // Create the store
  const store = createStore(reducer, enhancer);

  // init saga after the store created
  sagaMiddleware.run(rootSaga);


  return store;
};

export default configureStore;<commit_msg>not working hotReload scripts<commit_after>import { createStore, combineReducers, compose, applyMiddleware } from 'redux';
import { routerReducer } from 'react-router-redux';
import createLogger from 'redux-logger';
import createSagaMiddleware from 'redux-saga';

import * as reducers from './../reducers/reducers';
import rootSaga from './../sagas/sagas';


// Reducers
const reducer = combineReducers({
  ...reducers,
  routing: routerReducer,
});


const configureStore = () => {
  const sagaMiddleware = createSagaMiddleware();
  const middlewares    = [sagaMiddleware];

  // Conditionally apply logging middlware when not in production
  if (process.env.NODE_ENV !== 'production') middlewares.push(createLogger());

  // Hot reload for devTool
  const enhancer = compose(
    applyMiddleware(...middlewares),
    window.devToolsExtension && window.devToolsExtension(),
  );

  // Create the store
  const store = createStore(reducer, enhancer);


// // Enable Webpack hot module replacement for reducers
//   if (module.hot) {
//     module.hot.accept('./../reducers/reducers', () => {
//       const nextRootReducer = require('./../reducers/reducers').default;
//       store.replaceReducer(nextRootReducer);
//     });
//   }


  // init saga after the store created
  sagaMiddleware.run(rootSaga);


  return store;
};

export default configureStore;
{'fraction_non_alphanumeric': 0.1282051282051282, 'fraction_numerical': 0.0, 'mean_word_length': 3.9876288659793815, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2332729', 'n_tokens_mistral': 743, 'n_tokens_neox': 706, 'n_words': 184}