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.

Does not rerender with webpack 5 + babel 7 (test repo included)

See original GitHub issue

Hi. I can’t get to work the live refresh. My setup is:

  "dependencies": {
    "react": "^17.0.1",
    "react-dom": "^17.0.1"
  },
  "devDependencies": {
    "@babel/core": "^7.12.10",
    "@babel/preset-react": "^7.12.10",
    "@pmmmwh/react-refresh-webpack-plugin": "^0.4.3",
    "babel-loader": "^8.2.2",
    "react-refresh": "^0.9.0",
    "webpack": "^5.13.0",
    "webpack-cli": "^4.3.1",
    "webpack-dev-server": "^3.11.2"
  }

I get the following text on the console on firefox:

[WDS] App updated. Recompiling...
[WDS] App hot update...
[HMR] Checking for updates on the server...
[HMR] Updated modules:
[HMR]  - ./src/test-component.js
[HMR] App is up to date.

But the content does not update.

You can see my webpack config and a test repo i did in: https://github.com/franz-ka/react-refresh-test

I also tested with webpack-dev-server@4.0.0-beta.0 without luck.

Thx, hope i can use this plugin because i wish to migrate from hot-reloader!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:5
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
pmmmwhcommented, Jan 21, 2021

@momesana thanks for spotting this!

I do think we would throw if no entry point is detected. This probably is a bug and I’ll take a look.

1reaction
pmmmwhcommented, Jan 21, 2021

I’ll take a look at this during the weekend!

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Ecosystem: Setting up Babel 7 and Webpack 5 for React
Babel is a transcompiler which is mainly used to compiles ES6 code to backward compatible code that can run on older Javascript engines....
Read more >
webpack 5 with babel build not exporting functions
I am using webpack 5 with babel. The build succeeds, but when I try use the component it is aparent that the component...
Read more >
Hooks FAQ - React
If your testing solution doesn't rely on React internals, testing components with Hooks shouldn't be different from how you normally test components.
Read more >
How We Reduced Our React App's Load Time by 60% - InfoQ
React handles UI updates efficiently but it does not magically make your web app faster. Although we knew how React worked and how...
Read more >
Creating a React App from scratch - Webpack5, TypeScript4+ ...
CRA uses older versions of many packages and doesn't stay up to date ... It is worth noting here that webpack 5 has...
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