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.

HMR for @nrwl/react

See original GitHub issue

How to enable HMR for @nrwl/react. Is it possible to achieve it without custom webpack.config.json? (Like in Angular)

There should be something in docs for HMR.

In workspace.json “hmr”: true

"serve": {
          "builder": "@nrwl/web:dev-server",
          "options": {
            "hmr": true,
            "buildTarget": "testapp:build"
          },
          "configurations": {
            "production": {
              "buildTarget": "testapp:build:production"
            }
          }

Expected Behavior

module.hot should not be undefined

Current Behavior

HMR doesn´t work.

Context

    "@nrwl/cypress": "8.5.1",
    "@nrwl/eslint-plugin-nx": "8.5.1",
    "@nrwl/jest": "8.5.1",
    "@nrwl/react": "8.5.1",
    "@nrwl/web": "8.5.1",
    "@nrwl/workspace": "8.5.1",

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:33
  • Comments:39 (2 by maintainers)

github_iconTop GitHub Comments

17reactions
cafesanucommented, Dec 14, 2020

@BigAB Wondering if there is any news here? This would be a great improvement for the nrwl react community 🙂

Thanks!

13reactions
dcastilcommented, Mar 29, 2021

Not stale, I’m waiting for this! 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

Enable Hot Module Replacement(HMR ... - DEV Community ‍ ‍
HMR offer many benefits. Here is a quote from the official webpack website: Hot Module Replacement (HMR) exchanges, adds, or removes modules ...
Read more >
Enable Hot Module Replacement(HMR) in Nrwl/Nx React ...
HMR offer many benefits. Here is a quote from the official webpack website: Hot Module Replacement (HMR) exchanges, adds, or removes modules while...
Read more >
nx react module federation hot reload - Stack Overflow
I applied the hmr: true option in both project.json files. (for the host and the remote). The problem that its working only for...
Read more >
@nrwl/react:module-federation-dev-server | Nx
Next generation build system with first class monorepo support and powerful integrations.
Read more >
Building ⚛️ React Micro Frontends Monorepo with NX in 5 min
npm install -D @nrwl/react ... nx g @nrwl/react:app remote ... “hmr”: false — It will avoid reloading loop of async remote app importing;....
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 Hashnode Post

No results found