NextJS Hot Reload
See original GitHub issueWhat version of Next.js are you using?
12.0.2
What version of Node.js are you using?
14.17.1
What browser are you using?
Chrome
What operating system are you using?
macOS
How are you deploying your application?
Local
Describe the Bug
NextJS keeps refreshing when code is updated, the log below shows what happens
I’ve read about the warning in other issues, but didn’t have it prior to upgrading to next 12
while
_devMiddlewareManifest
is new
couldn’t reproduce due to the fact the project is actually big and was working fine prior to upgrading any update is causing a refresh
Expected Behavior
The page shouldn’t be refreshing
To Reproduce
Upgraded to next 12.0.2 and used a middleware in a subfolder (nothing else)
Issue Analytics
- State:
- Created 2 years ago
- Reactions:15
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Basic Features: Fast Refresh - Next.js
Next.js ' Fast Refresh is a new hot reloading experience that gives you instantaneous feedback on edits made to your React components.
Read more >Next.js : Refresh page after modifying a file, without rerunning ...
js by default will hotreload any changes, you don't even need to refresh the browser. But if you add a custom server, it...
Read more >How To Enable Hot Reloading for .env Files in Next.js
Let's learn how to make Next.js hot reload your .env files without having to relaunch the local development server or manually reload the...
Read more >Hot Reload MDX changes in Next.js and Nx
Hot Reload MDX changes in Next.js and Nx. In the previous article we learned how to use next-mdx-remote to load and hydrate MDX...
Read more >NextJS Fast Refresh - GeeksforGeeks
Fast Refresh is a new hot reloading experience that gives you instantaneous feedback on edits made to your React components. It is now...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I don’t know if it is related, but I have the exact same issue when I include a “_document.tsx” file in my pages directory. Any code modification in my components triggers a full reload of the page. When “_document.tsx” is removed, hot reloads work as intended.
Even the default _document example from the vercel website triggers the same full reload behaviour.
Next.js 12.0.0 & 12.0.2
I was about to submit the same issue. There are multiple unexpected behaviours: