Skip to content

feat(runtime-vapor): add support for v-once#13459

Merged
edison1105 merged 5 commits intominorfrom
edison/fix/vaporOnce
Oct 21, 2025
Merged

feat(runtime-vapor): add support for v-once#13459
edison1105 merged 5 commits intominorfrom
edison/fix/vaporOnce

Conversation

@edison1105
Copy link
Copy Markdown
Member

No description provided.

@netlify
Copy link
Copy Markdown

netlify bot commented Jun 10, 2025

Deploy Preview for vapor-repl ready!

Name Link
🔨 Latest commit d8183e8
🔍 Latest deploy log https://app.netlify.com/projects/vapor-repl/deploys/6854ff3bf140470008e45ed4
😎 Deploy Preview https://deploy-preview-13459--vapor-repl.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jun 10, 2025

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.

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

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch edison/fix/vaporOnce

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

@edison1105 edison1105 added the scope: vapor related to vapor mode label Jun 10, 2025
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Jun 10, 2025

Open in StackBlitz

@vue/compiler-core

npm i https://pkg.pr.new/@vue/compiler-core@13459

@vue/compiler-dom

npm i https://pkg.pr.new/@vue/compiler-dom@13459

@vue/compiler-sfc

npm i https://pkg.pr.new/@vue/compiler-sfc@13459

@vue/compiler-ssr

npm i https://pkg.pr.new/@vue/compiler-ssr@13459

@vue/compiler-vapor

npm i https://pkg.pr.new/@vue/compiler-vapor@13459

@vue/reactivity

npm i https://pkg.pr.new/@vue/reactivity@13459

@vue/runtime-core

npm i https://pkg.pr.new/@vue/runtime-core@13459

@vue/runtime-dom

npm i https://pkg.pr.new/@vue/runtime-dom@13459

@vue/runtime-vapor

npm i https://pkg.pr.new/@vue/runtime-vapor@13459

@vue/server-renderer

npm i https://pkg.pr.new/@vue/server-renderer@13459

@vue/shared

npm i https://pkg.pr.new/@vue/shared@13459

vue

npm i https://pkg.pr.new/vue@13459

@vue/compat

npm i https://pkg.pr.new/@vue/compat@13459

commit: 55b12b9

@edison1105 edison1105 marked this pull request as ready for review June 10, 2025 08:32
Base automatically changed from vapor to minor July 7, 2025 00:06
@github-actions
Copy link
Copy Markdown

github-actions bot commented Jul 16, 2025

Size Report

Bundles

File Size Gzip Brotli
compiler-dom.global.prod.js 84.5 kB 30 kB 26.4 kB
runtime-dom.global.prod.js 105 kB 39.6 kB 35.6 kB
vue.global.prod.js 163 kB 59.7 kB 53.2 kB

Usages

Name Size Gzip Brotli
createApp (CAPI only) 47.4 kB 18.5 kB 17 kB
createApp 56.3 kB 21.7 kB 19.8 kB
createApp + vaporInteropPlugin 88.4 kB (+197 B) 33.1 kB (+71 B) 30 kB (+56 B)
createVaporApp 32.4 kB (+190 B) 12.4 kB (+70 B) 11.3 kB (+67 B)
createSSRApp 60.6 kB 23.4 kB 21.4 kB
defineCustomElement 61.3 kB 23.2 kB 21.2 kB
overall 71.2 kB 27 kB 24.6 kB

@LittleSound LittleSound mentioned this pull request Jul 22, 2025
22 tasks
const setFn = () =>
setDynamicProps(el, [resolveDynamicProps(rawProps as RawProps)])
})
if (once) setFn()
Copy link
Copy Markdown
Contributor

@alex-snezhko alex-snezhko Oct 12, 2025

Choose a reason for hiding this comment

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

Are all of the other side effects of renderEffect safe/desired to avoid in the event of a v-once e.g. setCurrentInstance, beforeUpdate/updated lifecycle hooks, startMeasure in RenderEffect.fn()?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The renderEffect inside the component remains unchanged. I believe what v-once aims to achieve is to prevent component updates caused by changes in props/attrs

@edison1105 edison1105 merged commit ff5a06c into minor Oct 21, 2025
17 checks passed
@edison1105 edison1105 deleted the edison/fix/vaporOnce branch October 21, 2025 03:03
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