next.js: with-yarn-workspace doesn't Hot Reload changes from another package even after yarn already updated dependency

  1. npm init next-app --example with-yarn-workspaces with-yarn-workspaces-app
  2. yarn dev
  3. open browser, foo is there
  4. open packages/foo/index.js, change module.exports = "foo"; to module.exports = "foo12";
  5. yarn updated foo in top-level node_modules folder to foo12
  6. check the browser, still foo
  7. refresh the browser, still foo
  8. re-run next dev, check browser, foo12 finally shows up.

Expect: Update packages/foo/index.js should trigger hot reload without re-running next dev

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 10
  • Comments: 19 (13 by maintainers)

Commits related to this issue

Most upvoted comments

This is not a Next.js bug, this can be closed.

You can follow the progress on this issue on the next-transpile-modules repo. πŸ˜‰

V5 will probably get released this week, and should fix it.

Thanks for the lighting fix!

But still not working 😦 @Timer

You can reproduce it using the same steps I mentioned from the top. I can see the example code has been updated with a function with a name, but still not working. You have to restart the next-cli.

There are some explanations here if you want a preview (be careful, it’s not perfect yet): https://github.com/martpie/next-transpile-modules/issues/115

@martpie it worked right up till next 10, I’m also investigating it. Looks like its getting ignored under watch options. Had to make a series of modifications to your latest branch for next 10 to bring back HMR - which i can get to work, though nothing actually shows up

ignore on watch options has a problem and the webpack cache management needs to be implemented

Hey everyone, next-transpile-modules maintainer here. πŸ‘‹ If anyone here is using @module-federation/next-transpile-modules, can you tell me if hot reloading on workspaces still works with Next.js 10?