next.js: with-yarn-workspace doesn't Hot Reload changes from another package even after yarn already updated dependency
npm init next-app --example with-yarn-workspaces with-yarn-workspaces-appyarn dev- open browser,
foois there - open
packages/foo/index.js, changemodule.exports = "foo";tomodule.exports = "foo12"; - yarn updated
fooin top-levelnode_modulesfolder tofoo12 - check the browser, still
foo - refresh the browser, still
foo - re-run
next dev, check browser,foo12finally 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
- Update Examples for Fast Refresh This updates all of our examples for Fast Refresh compatibility. --- Closes #13039 — committed to Timer/next.js by Timer 4 years ago
This is not a Next.js bug, this can be closed.
You can follow the progress on this issue on the
next-transpile-modulesrepo. πV5 will probably get released this week, and should fix it.
Just install from mine @module-federation/next-transpile-modules
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-modulesmaintainer 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?