-
Notifications
You must be signed in to change notification settings - Fork 50
Open
Description
Is it possible to use the Hot Module Replacement plugin? I've played around with it in the dev.webpack.config file (and start it with 'webpack-dev-server --config dev.webpack.config') but I can't get it to work.
I also updated the configureStore
method like this:
export default function configureStore(initialState, history, client) {
const enhancer = compose(
applyMiddleware(thunk),
applyMiddleware(routerMiddleware(history)),
applyMiddleware(createMiddleware(client)),
devTools
)(createStore);
const finalEnhancer = enhancer(reducer, initialState);
if (module.hot) {
// Enable Webpack hot module replacement for reducers
module.hot.accept('./reducer', () => {
const nextRootReducer = require('./reducer');
finalEnhancer.replaceReducer(nextRootReducer);
});
}
// return enhancer(reducer, initialState);
return finalEnhancer;
}
Any clues?
Legogris
Metadata
Metadata
Assignees
Labels
No labels