core icon indicating copy to clipboard operation
core copied to clipboard

feat(runtime-vapor): support setup fn and render fn co-usage for defineVaporComponent

Open zhiyuanzmj opened this issue 4 months ago โ€ข 3 comments

const Comp = defineVaporComponent({
  setup() {
    // expose
    return {
      foo: 1
    }
  },
  render() {
    return <div />
  }
})

const comp = new Comp()
comp.exposeProxy.foo === 1

zhiyuanzmj avatar Dec 08 '25 08:12 zhiyuanzmj

[!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.

[!NOTE]

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

โœจ Finishing touches
๐Ÿงช Generate unit tests (beta)
  • [ ] Create PR with unit tests
  • [ ] Post copyable unit tests in a comment

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

coderabbitai[bot] avatar Dec 08 '25 08:12 coderabbitai[bot]

Size Report

Bundles

File Size Gzip Brotli
compiler-dom.global.prod.js 85.2 kB 29.9 kB 26.4 kB
runtime-dom.global.prod.js 108 kB 40.5 kB 36.5 kB
vue.global.prod.js 166 kB 60.5 kB 53.8 kB

Usages

Name Size Gzip Brotli
createApp (CAPI only) 48.2 kB 18.8 kB 17.2 kB
createApp 57.2 kB 22 kB 20.1 kB
createApp + vaporInteropPlugin 96.1 kB (+106 B) 35.5 kB (+46 B) 32 kB (+66 B)
createVaporApp 42.5 kB (+391 B) 15.6 kB (+157 B) 14.2 kB (+123 B)
createSSRApp 61.6 kB 23.8 kB 21.7 kB
defineCustomElement 63.3 kB 23.9 kB 21.8 kB
overall 71.9 kB 27.2 kB 24.8 kB

github-actions[bot] avatar Dec 08 '25 08:12 github-actions[bot]

Open in StackBlitz

@vue/compiler-core

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

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

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

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

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

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

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

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

npm i https://pkg.pr.new/@vue/runtime-vapor@14179
@vue/server-renderer

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

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

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

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

commit: 7a85f92

pkg-pr-new[bot] avatar Dec 08 '25 08:12 pkg-pr-new[bot]