Skip to content

fix(compiler-vapor): generate valid code for an empty directive expression - #15771

Merged
edison1105 merged 1 commit into
vuejs:minorfrom
ValentinYoushkevich:fix/vapor-empty-directive-expression
Oct 5, 2026
Merged

edison1105 merged 1 commit into
vuejs:minorfrom
ValentinYoushkevich:fix/vapor-empty-directive-expression

Conversation

@ValentinYoushkevich

Copy link
Copy Markdown
Contributor

A directive with an empty value, such as v-show="", a custom v-close-popup="" or <component :is="">, compiles in VDOM, where the value is simply undefined, but the Vapor compiler emits the getter () => () and the whole component fails to parse. genExpression returned the empty source unchanged, which VDOM tolerates inside its directive array but not as a function body. An empty expression now generates void 0; output for non-empty expressions is unchanged.

Seen in JeecgBoot (not Vapor yet).

Playground

@coderabbitai

coderabbitai Bot commented Oct 5, 2026

Copy link
Copy Markdown

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: Advanced
  • Run ID: a20a00d7-1428-49a2-b7cd-bf309d58c6db

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
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@pkg-pr-new

pkg-pr-new Bot commented Oct 5, 2026

Copy link
Copy Markdown

Open in StackBlitz

@vue/compiler-core

pnpm add https://pkg.pr.new/@vue/compiler-core@15771
npm i https://pkg.pr.new/@vue/compiler-core@15771
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/compiler-dom

pnpm add https://pkg.pr.new/@vue/compiler-dom@15771
npm i https://pkg.pr.new/@vue/compiler-dom@15771
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/compiler-sfc

pnpm add https://pkg.pr.new/@vue/compiler-sfc@15771
npm i https://pkg.pr.new/@vue/compiler-sfc@15771
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/compiler-ssr

pnpm add https://pkg.pr.new/@vue/compiler-ssr@15771
npm i https://pkg.pr.new/@vue/compiler-ssr@15771
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/compiler-vapor

pnpm add https://pkg.pr.new/@vue/compiler-vapor@15771
npm i https://pkg.pr.new/@vue/compiler-vapor@15771
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/reactivity

pnpm add https://pkg.pr.new/@vue/reactivity@15771
npm i https://pkg.pr.new/@vue/reactivity@15771
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/runtime-core

pnpm add https://pkg.pr.new/@vue/runtime-core@15771
npm i https://pkg.pr.new/@vue/runtime-core@15771
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/runtime-dom

pnpm add https://pkg.pr.new/@vue/runtime-dom@15771
npm i https://pkg.pr.new/@vue/runtime-dom@15771
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/runtime-vapor

pnpm add https://pkg.pr.new/@vue/runtime-vapor@15771
npm i https://pkg.pr.new/@vue/runtime-vapor@15771
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/server-renderer

pnpm add https://pkg.pr.new/@vue/server-renderer@15771
npm i https://pkg.pr.new/@vue/server-renderer@15771
yarn add https://pkg.pr.new/@vue/[email protected]

@vue/shared

pnpm add https://pkg.pr.new/@vue/shared@15771
npm i https://pkg.pr.new/@vue/shared@15771
yarn add https://pkg.pr.new/@vue/[email protected]

vue

pnpm add https://pkg.pr.new/vue@15771
npm i https://pkg.pr.new/vue@15771
yarn add https://pkg.pr.new/[email protected]

@vue/compat

pnpm add https://pkg.pr.new/@vue/compat@15771
npm i https://pkg.pr.new/@vue/compat@15771
yarn add https://pkg.pr.new/@vue/[email protected]

commit: c7c817d

@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown

Size Report

Bundles

File Size Gzip Brotli
compiler-dom.global.prod.js 87.2 kB (+1 B) 30.6 kB (+1 B) 26.9 kB (-42 B)
runtime-dom.global.prod.js 117 kB (+125 B) 43.9 kB (+54 B) 39.3 kB (+54 B)
vue.global.prod.js 177 kB (+125 B) 64 kB (+63 B) 57 kB (+46 B)

Usages

Name Size Gzip Brotli
createApp (CAPI only) 53.2 kB (+106 B) 20.7 kB (+45 B) 18.9 kB (+20 B)
createApp 62 kB (+106 B) 23.9 kB (+42 B) 21.8 kB (+27 B)
createApp + vaporInteropPlugin 129 kB (+6.7 kB) 46.6 kB (+2.37 kB) 41.9 kB (+2.08 kB)
createVaporApp 34.1 kB (+3.3 kB) 13.1 kB (+1.26 kB) 12 kB (+1.15 kB)
createSSRApp 67 kB (+106 B) 26 kB (+48 B) 23.6 kB (+31 B)
createVaporSSRApp 40.8 kB (+3.73 kB) 15.5 kB (+1.43 kB) 14.2 kB (+1.3 kB)
defineCustomElement 68.5 kB (+106 B) 25.9 kB (+47 B) 23.6 kB (+57 B)
defineVaporCustomElement 48.6 kB (+2.44 kB) 17.7 kB (+925 B) 16.3 kB (+876 B)
overall 77.5 kB (+106 B) 29.5 kB (+46 B) 26.7 kB (+98 B)

@edison1105
edison1105 merged commit 7a20552 into vuejs:minor Oct 5, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants