-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
fix(nuxt): add warning for lazy-hydration missing prefix #32832
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
Conversation
|
WalkthroughA conditional warning log has been introduced in the lazy-hydration-transform plugin. The code now checks if a component node possesses lazy-hydration properties but its name does not start with "Lazy", "lazy-", and is not a "template" element. If these conditions are met, a warning is logged suggesting to rename the component to a lazy variant or remove the lazy-hydration properties. This warning is triggered before the existing logic that skips further processing for non-lazy components. The components collection was changed from an array to a Set for more efficient lookup. The warning message includes the component name and relative file path, resolved by reversing aliases including a new stripped alias map. No changes were made to exported or public entity declarations. Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
✨ 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. 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 #32832 will not alter performanceComparing Summary
|
🔗 Linked issue
resolves #32736
📚 Description
Add a missing warning for components that use the
lazy-hydration
props but aren't prefixed with<Lazy
. This helps catch cases where developers intend to lazy-load a component but forget the naming convention, potentially leading to unexpected behavior.Example:
Warning:
