eugen_sunic eugen_sunic -4 years ago 163
Node.js Question

Cannot get Hot Module working in Atom

I've installed everything what I need (webpack, webpack-server), confingured my webpack.config.js and package.json, still the localhost:8080 does not render on safe. Neither does it render on localhost:8080/webpack-dev-server/index.html on safe. On manual reload it renders perfectly.


enter image description here

webpack.config.jsenter image description here

npm run dev executes successfully but I also have to reload the page manually after I make some changes in my index.html which is in the parent folder. Also, I always have to run webpack manually in my cmd when I change my .js file. Hot loading should also take care of this if I'm correct.

Let me also add that the app is recompiling when I run CTRL+s but it doesn't actually recompile.

enter image description here

Answer Source

I had a similar problem with live reloading on changes. Try to change link to bundle.js in your index.html <script src="/bundle.js"></script> If you look in console output after npm start there will be same like webpack output is served from / Dev-server takes bundle from root directory of your project, not from /js/bundle.js

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download