Skip to content

perf(runtime-vapor): tree-shake slot fallback from non-slot bundles#14765

Merged
edison1105 merged 5 commits intominorfrom
edison/benchTest
Apr 29, 2026
Merged

perf(runtime-vapor): tree-shake slot fallback from non-slot bundles#14765
edison1105 merged 5 commits intominorfrom
edison/benchTest

Conversation

@edison1105
Copy link
Copy Markdown
Member

@edison1105 edison1105 commented Apr 28, 2026

Summary by CodeRabbit

  • Refactoring
    • Restructured runtime feature management with conditional enablement for KeepAlive, Suspense, Teleport, and Transition components.
    • Features can now be dynamically activated or disabled at runtime based on application needs.
    • Improved code organization by consolidating feature-specific state and logic into dedicated modules for better maintainability.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 28, 2026

Important

Review skipped

Draft detected.

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: 3e2233ce-eee3-4ed3-be60-78c8740369bf

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:

  • ✅ Review completed - (🔄 Check again to review again)
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch edison/benchTest

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 Apr 28, 2026

Open in StackBlitz

@vue/compiler-core

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

@vue/compiler-dom

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

@vue/compiler-sfc

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

@vue/compiler-ssr

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

@vue/compiler-vapor

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

@vue/reactivity

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

@vue/runtime-core

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

@vue/runtime-dom

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

@vue/runtime-vapor

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

@vue/server-renderer

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

@vue/shared

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

vue

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

@vue/compat

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

commit: d002033

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 28, 2026

Size Report

Bundles

File Size Gzip Brotli
compiler-dom.global.prod.js 86.4 kB 30.3 kB 26.6 kB
runtime-dom.global.prod.js 113 kB 42.4 kB 38 kB
vue.global.prod.js 172 kB 62.2 kB 55.5 kB

Usages

Name Size Gzip Brotli
createApp (CAPI only) 51.3 kB 20 kB 18.3 kB
createApp 60.4 kB 23.3 kB 21.2 kB
createApp + vaporInteropPlugin 100 kB (+3.53 kB) 36.1 kB (+1.24 kB) 32.6 kB (+1.11 kB)
createVaporApp 27 kB (-7.94 kB) 10.5 kB (-2.34 kB) 9.64 kB (-2.15 kB)
createSSRApp 64.9 kB 25.1 kB 22.8 kB
createVaporSSRApp 32.6 kB (-8.86 kB) 12.5 kB (-2.6 kB) 11.5 kB (-2.37 kB)
defineCustomElement 67 kB 25.3 kB 23 kB
defineVaporCustomElement 39.8 kB (-2.51 kB) 14.2 kB (-882 B) 13 kB (-796 B)
overall 75.4 kB 28.7 kB 26.1 kB

@edison1105 edison1105 force-pushed the edison/benchTest branch 5 times, most recently from 72029d3 to 6c3129d Compare April 28, 2026 07:10
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/runtime-vapor/src/transition.ts`:
- Around line 16-17: applyTransitionHooks and applyTransitionLeaveHooks are
exported but left undefined causing runtime throws when called (e.g.,
fragment.ts invokes applyTransitionLeaveHooks). Initialize both registries to
safe no-op defaults: replace the undefined exports with functions named
applyTransitionHooks and applyTransitionLeaveHooks that match their declared
types (ApplyTransitionHooksFn, ApplyTransitionLeaveHooksFn) and perform a safe
no-op (sync or returning Promise/void as required by the types) so callers in
fragment.ts and elsewhere can call them before any registration occurs without
crashing.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 86cefcc6-af3f-4324-946e-a27ad35a5f12

📥 Commits

Reviewing files that changed from the base of the PR and between d3a584d and d002033.

📒 Files selected for processing (19)
  • packages/runtime-vapor/src/apiCreateDynamicComponent.ts
  • packages/runtime-vapor/src/apiCreateFor.ts
  • packages/runtime-vapor/src/apiDefineAsyncComponent.ts
  • packages/runtime-vapor/src/apiTemplateRef.ts
  • packages/runtime-vapor/src/block.ts
  • packages/runtime-vapor/src/component.ts
  • packages/runtime-vapor/src/components/KeepAlive.ts
  • packages/runtime-vapor/src/components/Suspense.ts
  • packages/runtime-vapor/src/components/Teleport.ts
  • packages/runtime-vapor/src/fragment.ts
  • packages/runtime-vapor/src/helpers/setKey.ts
  • packages/runtime-vapor/src/helpers/useCssVars.ts
  • packages/runtime-vapor/src/hmr.ts
  • packages/runtime-vapor/src/index.ts
  • packages/runtime-vapor/src/keepAlive.ts
  • packages/runtime-vapor/src/suspense.ts
  • packages/runtime-vapor/src/teleport.ts
  • packages/runtime-vapor/src/transition.ts
  • packages/runtime-vapor/src/vdomInterop.ts

Comment thread packages/runtime-vapor/src/transition.ts
@edison1105 edison1105 added the scope: vapor related to vapor mode label Apr 29, 2026
@edison1105 edison1105 marked this pull request as ready for review April 29, 2026 06:25
@edison1105 edison1105 merged commit 466ec98 into minor Apr 29, 2026
21 of 23 checks passed
@edison1105 edison1105 deleted the edison/benchTest branch April 29, 2026 06:25
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.

1 participant