Skip to content

fix(custom-element): update slot nodes when shadowRoot is false #13208

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

edison1105
Copy link
Member

close #13206

Copy link

github-actions bot commented Apr 16, 2025

Size Report

Bundles

File Size Gzip Brotli
runtime-dom.global.prod.js 101 kB (+332 B) 38.3 kB (+112 B) 34.5 kB (+112 B)
vue.global.prod.js 159 kB (+332 B) 58.4 kB (+127 B) 52 kB (+156 B)

Usages

Name Size Gzip Brotli
createApp (CAPI only) 46.5 kB (+83 B) 18.2 kB (+40 B) 16.6 kB (+44 B)
createApp 54.5 kB (+83 B) 21.2 kB (+38 B) 19.4 kB (+33 B)
createSSRApp 58.7 kB (+83 B) 23 kB (+47 B) 20.9 kB (+48 B)
defineCustomElement 59.5 kB (+319 B) 22.8 kB (+123 B) 20.8 kB (+94 B)
overall 68.6 kB (+83 B) 26.4 kB (+41 B) 24 kB (+54 B)

Copy link

pkg-pr-new bot commented Apr 16, 2025

Open in StackBlitz

@vue/compiler-core

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

@vue/compiler-dom

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

@vue/compiler-sfc

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

@vue/compiler-ssr

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

@vue/reactivity

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

@vue/runtime-core

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

@vue/runtime-dom

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

@vue/server-renderer

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

@vue/shared

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

vue

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

@vue/compat

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

commit: 1a5ea55

@edison1105 edison1105 marked this pull request as draft April 16, 2025 06:47
@wolandec
Copy link

Hi @edison1105, thanks for this fix, it works well with Vue 3.

However it doesn't work if we create custom elements from Vue 3 components and use them in Vue 2 or React wrapping with Vue 2 or React component similarly as I did in reproduction playground (see CEWrapperOne) . To provide more context: here is a schema of what we are working on at the moment. So we are creating a component library based on Vue 3 but to reuse this implementation in different applications written in Vue 2 or React we use custom elements created from Vue 3 components implementation.

image

@edison1105
Copy link
Member Author

@wolandec
I also found some issues in other scenarios and haven't found a good solution yet, so the PR is still in Draft status.

@wolandec
Copy link

@edison1105 thanks for the clarification, I'll prepare a reproduction repo for our case if it helps.

@wolandec
Copy link

wolandec commented Apr 18, 2025

@edison1105 https://github.com/wolandec/vue-core-issue-13206 Here is the repository with the reproduction of our case of using, I hope it helps. Please let me know if you need any help, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[custom elements api] using v-if in custom element slot doesn't work
2 participants