Skip to content

fix(compiler-vapor): normalize default dynamic slot names in transform#14619

Merged
edison1105 merged 3 commits intovuejs:minorfrom
jackma9604:fix/compiler-vapor
Mar 24, 2026
Merged

fix(compiler-vapor): normalize default dynamic slot names in transform#14619
edison1105 merged 3 commits intovuejs:minorfrom
jackma9604:fix/compiler-vapor

Conversation

@jackma9604
Copy link
Copy Markdown

Problem Description

Unable to correctly compile dynamic default named slots with v-if directives

Compilation failed. Console output: Cannot destructure property 'content' of 'node' as it is undefined.

Vue Version

3.6.0-beta.8

Link to minimal reproduction

Playground

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 23, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: bc3e4c04-77fc-46b8-8970-23c076258d71

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 23, 2026

Open in StackBlitz

@vue/compiler-core

pnpm add https://pkg.pr.new/@vue/compiler-core@14619
npm i https://pkg.pr.new/@vue/compiler-core@14619
yarn add https://pkg.pr.new/@vue/compiler-core@14619.tgz

@vue/compiler-dom

pnpm add https://pkg.pr.new/@vue/compiler-dom@14619
npm i https://pkg.pr.new/@vue/compiler-dom@14619
yarn add https://pkg.pr.new/@vue/compiler-dom@14619.tgz

@vue/compiler-sfc

pnpm add https://pkg.pr.new/@vue/compiler-sfc@14619
npm i https://pkg.pr.new/@vue/compiler-sfc@14619
yarn add https://pkg.pr.new/@vue/compiler-sfc@14619.tgz

@vue/compiler-ssr

pnpm add https://pkg.pr.new/@vue/compiler-ssr@14619
npm i https://pkg.pr.new/@vue/compiler-ssr@14619
yarn add https://pkg.pr.new/@vue/compiler-ssr@14619.tgz

@vue/compiler-vapor

pnpm add https://pkg.pr.new/@vue/compiler-vapor@14619
npm i https://pkg.pr.new/@vue/compiler-vapor@14619
yarn add https://pkg.pr.new/@vue/compiler-vapor@14619.tgz

@vue/reactivity

pnpm add https://pkg.pr.new/@vue/reactivity@14619
npm i https://pkg.pr.new/@vue/reactivity@14619
yarn add https://pkg.pr.new/@vue/reactivity@14619.tgz

@vue/runtime-core

pnpm add https://pkg.pr.new/@vue/runtime-core@14619
npm i https://pkg.pr.new/@vue/runtime-core@14619
yarn add https://pkg.pr.new/@vue/runtime-core@14619.tgz

@vue/runtime-dom

pnpm add https://pkg.pr.new/@vue/runtime-dom@14619
npm i https://pkg.pr.new/@vue/runtime-dom@14619
yarn add https://pkg.pr.new/@vue/runtime-dom@14619.tgz

@vue/runtime-vapor

pnpm add https://pkg.pr.new/@vue/runtime-vapor@14619
npm i https://pkg.pr.new/@vue/runtime-vapor@14619
yarn add https://pkg.pr.new/@vue/runtime-vapor@14619.tgz

@vue/server-renderer

pnpm add https://pkg.pr.new/@vue/server-renderer@14619
npm i https://pkg.pr.new/@vue/server-renderer@14619
yarn add https://pkg.pr.new/@vue/server-renderer@14619.tgz

@vue/shared

pnpm add https://pkg.pr.new/@vue/shared@14619
npm i https://pkg.pr.new/@vue/shared@14619
yarn add https://pkg.pr.new/@vue/shared@14619.tgz

vue

pnpm add https://pkg.pr.new/vue@14619
npm i https://pkg.pr.new/vue@14619
yarn add https://pkg.pr.new/vue@14619.tgz

@vue/compat

pnpm add https://pkg.pr.new/@vue/compat@14619
npm i https://pkg.pr.new/@vue/compat@14619
yarn add https://pkg.pr.new/@vue/compat@14619.tgz

commit: 90d7695

@github-actions
Copy link
Copy Markdown

Size Report

Bundles

File Size Gzip Brotli
compiler-dom.global.prod.js 86.4 kB 30.2 kB 26.6 kB
runtime-dom.global.prod.js 111 kB 41.9 kB 37.5 kB
vue.global.prod.js 170 kB 61.7 kB 55 kB

Usages

Name Size Gzip Brotli
createApp (CAPI only) 50.6 kB 19.8 kB 18 kB
createApp 59.6 kB 23.1 kB 21 kB
createApp + vaporInteropPlugin 85.9 kB 31.8 kB 28.7 kB
createVaporApp 28.8 kB 11.2 kB 10.2 kB
createSSRApp 63.9 kB 24.8 kB 22.5 kB
createVaporSSRApp 32.1 kB 12.4 kB 11.4 kB
defineCustomElement 66.2 kB 25.1 kB 22.8 kB
defineVaporCustomElement 39.5 kB 14.6 kB 13.4 kB
overall 74.5 kB 28.4 kB 25.8 kB

@edison1105 edison1105 added the scope: vapor related to vapor mode label Mar 23, 2026
@edison1105
Copy link
Copy Markdown
Member

good catch!

@edison1105 edison1105 changed the title fix(compiler-vapor): Correctly handle dynamic named slots with v-if d… fix(compiler-vapor): correctly handle dynamic named slots with v-if Mar 23, 2026
@jackma9604
Copy link
Copy Markdown
Author

good catch!

Is my adjustment correct?

@edison1105
Copy link
Copy Markdown
Member

@jackma9604 We should ensure the slot name is not undefined in the transform phase. see 90d7695

@edison1105 edison1105 changed the title fix(compiler-vapor): correctly handle dynamic named slots with v-if fix(compiler-vapor): normalize default dynamic slot names in transform Mar 24, 2026
@edison1105 edison1105 merged commit c615e05 into vuejs:minor Mar 24, 2026
13 of 15 checks passed
@jackma9604 jackma9604 deleted the fix/compiler-vapor branch March 24, 2026 06:58
zhiyuanzmj added a commit to vuejs/vue-jsx-vapor that referenced this pull request Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: vapor related to vapor mode

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants