-
- Notifications
You must be signed in to change notification settings - Fork 8.8k
fix(compiler-vapor): prevent v-for components from being single root #13149
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
✅ Deploy Preview for vapor-repl ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
@vue/compiler-core
@vue/compiler-dom
@vue/compiler-sfc
@vue/compiler-ssr
@vue/compiler-vapor
@vue/reactivity
@vue/runtime-core
@vue/runtime-dom
@vue/runtime-vapor
@vue/server-renderer
@vue/shared
vue
@vue/compat
commit: |
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 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 ( |
This PR is related to vuejs/vue-vapor#299.
Summary
This PR continues the work from vuejs/vue-vapor#305 to fix an issue where components with v-for directives were incorrectly marked as single root components in vapor mode.
Overview
As noted in the original PR, when a component has only a single root element, the fourth argument is included in
createComponent
. However, if there are multiple elements or if the component usesv-for
, it should not be marked as a single root.Scope of work
Added
hasVFor
check to detect components with v-for directives.Example
Now correctly compiles without marking the component as a single root.
Additional Notes
The previous PR in vue-vapor was closed as the work has moved to the vapor branch in the core repository. This PR implements the same fix but in the current development location.
If you have any feedback or suggestions, please let me know.