core icon indicating copy to clipboard operation
core copied to clipboard

fix(compiler-sfc): properly hoist comments in the `setup` sfc

Open linzhe141 opened this issue 1 year ago • 2 comments

close #12114

Maybe more reasonable to hoist the comment nodes in the setup SFC.

this pr -- playgroud

linzhe141 avatar Oct 06 '24 13:10 linzhe141

Size Report

Bundles

File Size Gzip Brotli
runtime-dom.global.prod.js 101 kB 38.1 kB 34.2 kB
vue.global.prod.js 160 kB 58 kB 51.5 kB

Usages

Name Size Gzip Brotli
createApp (CAPI only) 49.1 kB 18.9 kB 17.3 kB
createApp 55.7 kB 21.4 kB 19.6 kB
createSSRApp 59.7 kB 23.1 kB 21 kB
defineCustomElement 60.4 kB 23 kB 20.9 kB
overall 69.4 kB 26.5 kB 24.1 kB

github-actions[bot] avatar Oct 06 '24 13:10 github-actions[bot]

Open in Stackblitz

@vue/compiler-core

pnpm add https://pkg.pr.new/@vue/compiler-core@12115
@vue/compiler-dom

pnpm add https://pkg.pr.new/@vue/compiler-dom@12115
@vue/compiler-ssr

pnpm add https://pkg.pr.new/@vue/compiler-ssr@12115
@vue/compiler-sfc

pnpm add https://pkg.pr.new/@vue/compiler-sfc@12115
@vue/reactivity

pnpm add https://pkg.pr.new/@vue/reactivity@12115
@vue/runtime-core

pnpm add https://pkg.pr.new/@vue/runtime-core@12115
@vue/runtime-dom

pnpm add https://pkg.pr.new/@vue/runtime-dom@12115
@vue/server-renderer

pnpm add https://pkg.pr.new/@vue/server-renderer@12115
@vue/shared

pnpm add https://pkg.pr.new/@vue/shared@12115
vue

pnpm add https://pkg.pr.new/vue@12115
@vue/compat

pnpm add https://pkg.pr.new/@vue/compat@12115

commit: f7d9b2d

pkg-pr-new[bot] avatar Oct 06 '24 13:10 pkg-pr-new[bot]

https://github.com/vuejs/core/issues/12114#issuecomment-2406479049

Also, I don't think it's worth it to introduce such extra complexity for something that does not affect runtime behavior.

yyx990803 avatar Oct 11 '24 03:10 yyx990803