Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(runtime-core): avoid rendering plain object as VNode #12038

Merged
merged 2 commits into from
Sep 26, 2024

Conversation

edison1105
Copy link
Member

@edison1105 edison1105 commented Sep 26, 2024

close #12035
close vitejs/vite-plugin-vue#353

I initially planned to fix this in @vue/babel-plugin-jsx like this. However, I encountered this scenario during the process. It might require introducing additional runtime checks to determine whether the child is a VNode or an Object. Doing so could lead to some performance loss, so I abandoned this approach.

Copy link

Size Report

Bundles

File Size Gzip Brotli
runtime-dom.global.prod.js 101 kB (-13 B) 38 kB 34.2 kB (-28 B)
vue.global.prod.js 160 kB (-13 B) 58 kB (-1 B) 51.6 kB (+69 B)

Usages

Name Size Gzip Brotli
createApp (CAPI only) 49 kB (+10 B) 18.9 kB 17.3 kB (+46 B)
createApp 55.6 kB (+10 B) 21.4 kB (+7 B) 19.5 kB (-22 B)
createSSRApp 59.6 kB (+10 B) 23.1 kB (+4 B) 21 kB (+48 B)
defineCustomElement 60.4 kB (+10 B) 23 kB (+7 B) 20.9 kB (+6 B)
overall 69.3 kB (-13 B) 26.5 kB (-1 B) 24.1 kB (+59 B)

Copy link

pkg-pr-new bot commented Sep 26, 2024

Open in Stackblitz

@vue/compiler-dom

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

@vue/compiler-core

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

@vue/compiler-sfc

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

@vue/compiler-ssr

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

@vue/reactivity

pnpm add https://pkg.pr.new/@vue/reactivity@12038

@vue/runtime-dom

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

@vue/runtime-core

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

@vue/server-renderer

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

@vue/shared

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

vue

pnpm add https://pkg.pr.new/vue@12038

@vue/compat

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

commit: 0574815

@edison1105
Copy link
Member Author

/ecosystem-ci run

@edison1105 edison1105 changed the title fix(runtime-core): avoid rendering plainObject as VNode fix(runtime-core): avoid rendering plain object as VNode Sep 26, 2024
@vue-bot
Copy link
Contributor

vue-bot commented Sep 26, 2024

📝 Ran ecosystem CI: Open

suite result latest scheduled
language-tools failure failure
nuxt success success
pinia success success
primevue success success
quasar success success
radix-vue success success
router success success
test-utils success success
vant success success
vite-plugin-vue success success
vitepress success success
vue-i18n success success
vue-macros success success
vuetify success success
vueuse success success
vue-simple-compiler success success

@edison1105 edison1105 added ready to merge The PR is ready to be merged. 🍰 p2-nice-to-have Priority 2: this is not breaking anything but nice to have it addressed. labels Sep 26, 2024
@yyx990803 yyx990803 merged commit cb34b28 into main Sep 26, 2024
15 checks passed
@yyx990803 yyx990803 deleted the edison/fix/12035 branch September 26, 2024 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍰 p2-nice-to-have Priority 2: this is not breaking anything but nice to have it addressed. ready to merge The PR is ready to be merged.
Projects
None yet
3 participants