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.

Stale stats when not using HotModuleReplacementPlugin

See original GitHub issue

💥 Regression Report

Using module.hot is preventing cache clear if not using HotModuleReplacementPlugin or Webpack completely for server. (8f10896058cdfd542c2aca1a982c2e14b1d9707a)

Last working version

Worked up to version: v5.14.2

Stopped working in version: v5.15.0 (commit 8f10896058cdfd542c2aca1a982c2e14b1d9707a)

To Reproduce

Steps to reproduce the behavior:

Download example https://github.com/gregberge/loadable-components/tree/main/examples/server-side-rendering. Run npm run build:webpack -- --watch in one terminal and babel-node src/server/main.js in second.

Then change Test in App.js to Test 2 - you will get old bundles in the HTML and warning Text content did not match. Server: "Test 2" Client: "Test" if you refresh the page.

On v5.14.2 this is working as it should.

Expected behavior

There should be no warning and correct bundles after refresh.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
theKasheycommented, Jan 9, 2022

module.hot is used to understand that module cache can be accessed and operated with. There are better ways to do the same and clearModuleCache is already contain all required checks.

👍 module.hot should be removed

0reactions
stale[bot]commented, Apr 16, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

DBA_TAB_STATISTICS Reports Stale Statistics Despite The ...
No change in COUNT(*) from the table and NUM_ROWS so that the statistics are NOT really STALE. DBA_TAB_MODIFICATIONS however shows the entries ...
Read more >
HotModuleReplacementPlugin - webpack
Enables Hot Module Replacement, otherwise known as HMR. warning. HMR should never be used in production. Basic Usage. Enabling HMR is straightforward and ......
Read more >
Webpack HMR with Express App - Medium
Explores integrating Webpack HMR into an existing Express app versus using the Webpack Dev Server.
Read more >
webpack/webpack - Gitter
It seems that serverless is not uploading the module ... dist', hot: true, hmr: true }, stats: { errorDetails: false } }; const...
Read more >
How to use the webpack.HotModuleReplacementPlugin ...
new InterpolateHtmlPlugin(HtmlWebpackPlugin, env.raw), // This gives some necessary context to module not found errors, such as // the requesting resource. new ...
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