-
Notifications
You must be signed in to change notification settings - Fork 26.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make missing Document components trigger an error for production builds #32338
Labels
bug
Issue was opened via the bug report template.
Comments
10 tasks
ijjk
added a commit
that referenced
this issue
Dec 13, 2021
…ion builds (#32345) * Only validate _document subcomponents in dev environment * Replace error by a warning Co-authored-by: JJ Kasper <jj@jjsweb.site>
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. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
What version of Next.js are you using?
12.05 and above
What version of Node.js are you using?
14.17.6
What browser are you using?
Chrome
What operating system are you using?
macOS
How are you deploying your application?
Other platform
Describe the Bug
When the user is a bot we only want to serve a plain version of the page without any javascript, but since version 12.05 if we do not include NextScript it triggers a 500 Server error.
Expected Behavior
If we do not include NextScript it should render a version without javascripts, since this PR was merged we can not do it anymore. As far as I knew, requiring NextScripts for dev environments made total sense because it could not work without javascript in the client side, but in production we have cases where we do not want to send any javascript to the user and the page should be a plain html.
In the mentioned PR, the production check was removed.
To Reproduce
The text was updated successfully, but these errors were encountered: