Hello there. I've configured our project with webpack-dev-middleware but still can't resolve this error. No matter which component I change, it shows me this error:
process-update.js:81 [HMR] The following modules couldn't be hot updated: (Full reload needed)
This is usually because the modules which have changed (and their parents) do not know how to hot reload themselves. See http://webpack.github.io/docs/hot-module-replacement-with-webpack.html for more details.
/* eslint-disable react/jsx-filename-extension, global-require */
import React from 'react';
import { render } from 'react-dom';
import { AppContainer } from 'react-hot-loader';
import { syncHistoryWithStore } from 'react-router-redux';
import { browserHistory } from 'react-router';
import routes from 'routes';
import configureStore from 'redux-base/configureStore';
import AppRootComponent from './AppRootComponent';
const store = configureStore();
const history = syncHistoryWithStore(browserHistory, store);
render(
<AppContainer>
<AppRootComponent
store={ store }
history={ history }
routes={ routes }
/>
</AppContainer>,
document.getElementById('root')
);
if (module.hot) {
module.hot.accept('./AppRootComponent', () => {
// If you use Webpack 2 in ES modules mode, you can
// use <App /> here rather than require() a <NextApp />.
const NextApp = require('./AppRootComponent').default;
render(
<AppContainer>
<NextApp store={ store } history={ history } routes={ routes } />
</AppContainer>,
document.getElementById('root')
);
});
}
AppRootComponent.jsx
import React, { PropTypes } from 'react';
import { Provider } from 'react-redux';
import { Router } from 'react-router';
import 'normalize.css';
import 'styles/main.scss';
import DevTools from 'utils/DevTools';
import config from 'config';
// If you use React Router, make this component
// render <Router> with your routes. Currently,
// only synchronous routes are hot reloaded, and
// you will see a warning from <Router> on every reload.
// You can ignore this warning. For details, see:
// https://github.com/reactjs/react-router/issues/2182
const AppRootComponent = ({ store, history, routes }) => (
<Provider store={ store } >
<div>
<Router history={ history } routes={ routes } />
{!config.isProduction && <DevTools /> }
</div>
</Provider>
);
AppRootComponent.propTypes = {
store: PropTypes.object,
history: PropTypes.object,
routes: PropTypes.node,
};
export default AppRootComponent;
Hello there. I've configured our project with webpack-dev-middleware but still can't resolve this error. No matter which component I change, it shows me this error:
process-update.js:81 [HMR] The following modules couldn't be hot updated: (Full reload needed) This is usually because the modules which have changed (and their parents) do not know how to hot reload themselves. See http://webpack.github.io/docs/hot-module-replacement-with-webpack.html for more details.
babelrc file
webpack.config file
webpack.common
client.js (entry point)
AppRootComponent.jsx
routes.js
server.js
Did I miss something? I am using beta 6 version of react-hot-loader. Thanks for your answer :)