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.

Webpack-dev-server always triggering full page reload

See original GitHub issue

Hi, I integrated this plugin in a webpack-dev-server running in parallel to an expressjs server doing SSR. To get it working without always triggering a full page refresh i needed to add:

  if (module.hot) {
    module.hot.accept();
  }

Do you have any Idea why? I would love to do a small PR to the Readme 😃

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
pmmmwhcommented, Aug 21, 2020

Glad that you fixed your issue! I’ve always wanted to get a simple custom SSR example in this repo but I never got to do it … Maybe I should do it some time soon.

Regarding your fixes though, I think point 1 is the most crucial - the production build does not have dev tools hook setup so Fast Refresh would essentially be no-op.

0reactions
garandcommented, Aug 25, 2020

@pmmmwh Yep, that makes total sense. Thanks for explaining it that way. 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

File updates causing full page reload #350 - GitHub
accept() , the full page reloads are no longer triggered, but the page is not re-rendered. (Even after tweaking the state, clicking around,...
Read more >
Webpack-dev-server compiles files but does not refresh or ...
When enabled, file changes will trigger a full page reload. Example: module.exports = { //... devServer: { // ... watchContentBase: true } };....
Read more >
Why webpack-dev-server Live-Reload Is Not Working - Medium
Modifying the shell html pages will not trigger a live-reload unless you configure webpack-dev-server with watchContentBase to watch where ...
Read more >
A complete guide to full-stack live reload - LogRocket Blog
In this blog post, we will examine a variety of full-stack ... to pick up the latest code changes — each tiny code...
Read more >
DevServer - webpack
Tell dev-server to watch the files served by the static.directory option. It is enabled by default, and file changes will trigger a full...
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