Skip to content

fix(runtime-vapor): properly unmount nested vdom content - #15524

Merged
edison1105 merged 8 commits into
vuejs:minorfrom
ValentinYoushkevich:fix/vapor-vdom-unmount-in-element
Sep 16, 2026
Merged

edison1105 merged 8 commits into
vuejs:minorfrom
ValentinYoushkevich:fix/vapor-vdom-unmount-in-element

Conversation

@ValentinYoushkevich

@ValentinYoushkevich ValentinYoushkevich commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

A VDOM component inside an element in a Vapor template is never unmounted when the element is removed: onUnmounted doesn't run and its watchers keep firing. Playground The same goes for v-for rows, app.unmount() and VDOM slot content in a Vapor <div><slot /></div>.

Since c75d471 VDOM components are only unmounted by block removal, which doesn't descend into elements.

Block removal never reaches a block mounted into an element, so such a block now unmounts the VDOM components in its tree synchronously when its owner scope is disposed, as VDOM does for an element's children. Everything else still goes through block removal with transition hooks.

@coderabbitai

coderabbitai Bot commented Sep 15, 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: 682c5095-e506-4b9a-ab08-39275b9f350e

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

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 Sep 15, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@vue/compiler-core

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

@vue/compiler-dom

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

@vue/compiler-sfc

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

@vue/compiler-ssr

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

@vue/compiler-vapor

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

@vue/reactivity

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

@vue/runtime-core

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

@vue/runtime-dom

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

@vue/runtime-vapor

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

@vue/server-renderer

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

@vue/shared

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

vue

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

@vue/compat

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

commit: f4b7a95

@github-actions

github-actions Bot commented Sep 15, 2026 •

Copy link
Copy Markdown

Size Report

Bundles

File Size Gzip Brotli
compiler-dom.global.prod.js 87.2 kB 30.6 kB 26.9 kB
runtime-dom.global.prod.js 116 kB 43.7 kB 39.1 kB
vue.global.prod.js 176 kB 63.9 kB 56.8 kB

Usages

Name Size Gzip Brotli
createApp (CAPI only) 53.2 kB 20.6 kB 18.8 kB
createApp 61.9 kB 23.8 kB 21.7 kB
createApp + vaporInteropPlugin 120 kB (+258 B) 43.2 kB (+54 B) 38.9 kB (+59 B)
createVaporApp 30.6 kB 11.8 kB 10.8 kB
createSSRApp 67.1 kB 25.9 kB 23.5 kB
createVaporSSRApp 36.8 kB 14 kB 12.8 kB
defineCustomElement 68.5 kB 25.8 kB 23.5 kB
defineVaporCustomElement 46 kB 16.7 kB 15.4 kB
overall 77.3 kB 29.4 kB 26.6 kB

@edison1105 edison1105 added scope: vapor related to vapor mode interop vdom / vapor interop labels Sep 15, 2026
Comment thread packages/runtime-vapor/src/suspense.ts Resolved
@edison1105 edison1105 changed the title fix(runtime-vapor): unmount vdom components inside removed elements fix(runtime-vapor): properly unmount nested vdom content Sep 16, 2026
@edison1105
edison1105 merged commit 922a7dd into vuejs:minor Sep 16, 2026
17 checks passed
@ValentinYoushkevich
ValentinYoushkevich deleted the fix/vapor-vdom-unmount-in-element branch September 17, 2026 04:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

interop vdom / vapor interop scope: vapor related to vapor mode

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants