-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
feat(nuxt): add ssr debug prompt with link #31968
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
base: main
Are you sure you want to change the base?
Conversation
|
|
WalkthroughThis change introduces a development-only feature for debugging SSR (Server-Side Rendering) errors in Nuxt. A new middleware checks for the presence of a nuxt-no-ssr query parameter and sets a flag to disable SSR for that request. When an error occurs in development mode and is not a recursive SSR error, a debug prompt is displayed in the console with a link to reload the page with SSR disabled. Supporting utility and middleware files are added, and the middleware is conditionally registered during development. No changes are made to public API signatures. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
✨ Finishing Touches
🧪 Generate Unit Tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
@nuxt/kit
nuxt
@nuxt/rspack-builder
@nuxt/schema
@nuxt/vite-builder
@nuxt/webpack-builder
commit: |
CodSpeed Performance ReportMerging #31968 will not alter performanceComparing Summary
|
|
This is looking great. I think I'm going to merge this into some work I plan to do to display errors on the client side with Youch, so I'll complete that first and then merge this PR (in case you're wondering on the status). |
|
It could be more integrated into existing error flows more but it does solve the problem, so I'd happily see it merged, nice work 👍 |
🔗 Linked issue
resolves #21633
📚 Description
In this PR I am trying to add an ssr debug prompt whenever an error is encountered rendering a page with vite-node or nitro, so it will show a prompt in console or a special link that allows opening the page in browser with ssr: false (dev mode only) for debugging