question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to get server-side hot reloading working

See original GitHub issue

Thanks for this project. I’m having trouble getting hot reloading to work, so I thought I would create a “hello world” complete project to demonstrate. https://github.com/cmoad/koa-webpack-hmr-test

You should be able to clone the above repo then npm install and npm start.

If I curl localhost:5000 I get ok. I then change ok to test in index.js. I can see webpack recompile on the command line, but if I curl localhost:5000 I still get ok.

I should also note that I can’t get webpack to run without the plugin, new webpack.IgnorePlugin(/webpack/). Without that I see a lot of Module not found and Module parse failed from webpack dependencies.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:13 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
andyrjcommented, Jun 16, 2017

I believe I just ran into this myself and the issue was my babel config that prevented my hot reloading using es6 import statements… if your code hot reloads when you change to require(), try changing your babel options in webpack.config.js to something along these lines…

module: { rules: [ { test: /\.js$/, exclude: /node_modules/, use: { loader: 'babel-loader', options: { "presets": [ ["env", { "modules": false, "targets": { "node": "current" } }] ], "plugins": [ "transform-object-rest-spread" ] } } } ] },

that babel-preset-env setup should get es6 import code hot reloading properly in node server side code, sorry for the crap word wrapped paste from vscode ><

0reactions
twelve17commented, Jan 24, 2018

Wait, I just noticed https://github.com/shellscape/koa-webpack/issues/81, which may be a dupe of this issue, but more importantly, I also found https://github.com/webpack-contrib/webpack-hot-client/issues/8, which is what I think I’m running into. Going to go through that issue’s comments’ instructions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

webpack-dev-server hot reload not working - Stack Overflow
When I change a file I can see in terminal that a rebuild is happening but nothing happens in the browser. Am I...
Read more >
React hot reload not working for changes made in index.js
Changes made in index.js is not reflecting on the UI, hence hot reloading fails. For all other files, hot reload works just fine...
Read more >
.NET Hot Reload support for ASP.NET Core | Microsoft Learn
Use .NET Hot Reload to apply code changes to a running app without restarting the app and without losing app state.
Read more >
Blazor Hot reload not working when debugging
I'm using the latest preview of VS 2022 and I have a Blazor app -asp.net core hosted-. When I run the app -F5-...
Read more >
HotReloading not working? - RedwoodJS Community
I have a bizarre issue where my hot reloading isn't working correctly and I can't figure out where to start figuring out why...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found