mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-03 18:20:27 +00:00
* Upgraded Webpack 1.13 -> 2.2 * Made webpack.prodution.config.js work and updated yarn.lock * Updated a lot of small dependencies. * Upgraded React * Bunch of small devDependencies updated. * Fully updated devDependencies * Updated optionalDependencies * Updated everything except D3 zoom. * Fixed linting error. * Another update. * Reverted materialize-css upgrade and applied new eslint rules * Final fixes to webpack configs. * Updated yarn.lock again.
28 lines
748 B
JavaScript
28 lines
748 B
JavaScript
import { createStore, applyMiddleware, compose } from 'redux';
|
|
import thunkMiddleware from 'redux-thunk';
|
|
|
|
import DevTools from '../components/dev-tools';
|
|
import { initialState, rootReducer } from '../reducers/root';
|
|
|
|
export default function configureStore() {
|
|
const store = createStore(
|
|
rootReducer,
|
|
initialState,
|
|
compose(
|
|
// applyMiddleware(thunkMiddleware, createLogger()),
|
|
applyMiddleware(thunkMiddleware),
|
|
DevTools.instrument()
|
|
)
|
|
);
|
|
|
|
if (module.hot) {
|
|
// Enable Webpack hot module replacement for reducers
|
|
module.hot.accept('../reducers/root', () => {
|
|
const nextRootReducer = require('../reducers/root').default;
|
|
store.replaceReducer(nextRootReducer);
|
|
});
|
|
}
|
|
|
|
return store;
|
|
}
|