Open john1jan opened 6 years ago
What was your solution
I am getting this error
This is my routes.js
import React from 'react'; import { Route, IndexRoute } from 'react-router'; import NotFoundPage from './components/NotFound/NotFound'; import Wrapper from './views/Wrapper/Wrapper'; import importCss from './utils/importCss'; import LandingPage from './views/LandingPage/LandingPage' export default ( <Route path="/" component={Wrapper}> <IndexRoute name="LandingPage" component={LandingPage} /> <Route path="*" component={NotFoundPage} /> </Route> );
webpack: 3.6.0 webpack-dev-middleware: 1.10.2 webpack-hot-middleware: 2.21.2
What was your solution?
I added this to the bottom of my entry file
module.hot.accept((err) => {
console.log("reloading self");
window.location.reload();
})
I was using ES6 modules and after a lot of searching found that module.hot
was called import.meta.webpackHot
. So I added this to my entry file and I didn't get the error anymore.
if (import.meta.webpackHot) {
import.meta.webpackHot.accept();
}
I am getting this error
This is my routes.js
webpack: 3.6.0 webpack-dev-middleware: 1.10.2 webpack-hot-middleware: 2.21.2