You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are creating amp pages using next.js v9.1.7. we have found some curious behaviour using development mode on next.js. our pages are reloaded repeatedly every 60 seconds.
I would like to listen to next.js opinions.
next.js creates a javascript .next/static/development/pages/index.js when developer visits on top page (/) .
next.js removes static page like .next/static/development/pages/index.js it is not active (last access is 60sec ago) using on-demand-entry.js.
next.js (webpack dev middleware) re-creates the javascript .next/static/development/pages/index.js because watching directory is changed (removed index.js on 2)
amp-dev.js reloads our page because .next/static/development/pages are changed.
so 1-4 situation makes our page reload repeatedly on every 60secs.
I would like to know this is the correct behaviour or not.
I have investigated on-demand-entry.js. I know this webpack middleware removes inactive pages but I don't know why next.js re-creates the inactive pages again. in my humble opinion, it is not necessary to re-create the inactive pages.
And I think 60 seconds is short by default, I would like to change this duration to 600 seconds or longer.
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
I feel this issue is not next.js issue. If next.js developers have same feelings, I will close this issue.
However, this issue might be a trap for some users. It would be better to write some docs.
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
vercel
locked as resolved and limited conversation to collaborators
Jan 29, 2022
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Bug report
Describe the bug
page reloads repeatedly every 60 seconds.
We are creating amp pages using next.js v9.1.7. we have found some curious behaviour using development mode on next.js. our pages are reloaded repeatedly every 60 seconds.
I would like to listen to next.js opinions.
.next/static/development/pages/index.js
when developer visits on top page (/
) ..next/static/development/pages/index.js
it is not active (last access is 60sec ago) using on-demand-entry.js..next/static/development/pages/index.js
because watching directory is changed (removed index.js on2
)amp-dev.js
reloads our page because.next/static/development/pages
are changed.so 1-4 situation makes our page reload repeatedly on every 60secs.
I would like to know this is the correct behaviour or not.
I have investigated
on-demand-entry.js
. I know this webpack middleware removes inactive pages but I don't know why next.js re-creates the inactive pages again. in my humble opinion, it is not necessary to re-create the inactive pages.And I think 60 seconds is short by default, I would like to change this duration to 600 seconds or longer.
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
I have created reproducible repository
next-amp-issue
/
Expected behavior
pages do not reload when on demand entry.js removes the pages.
Screenshots
N/A
System information
Additional context
N/A
The text was updated successfully, but these errors were encountered: