Subscribe on changes!

defineCustomElement causes style loss

avatar
Nov 30th 2023

Vue version

3.3.4

Link to minimal reproduction

https://play.vuejs.org/#eNqVUk1TwjAQ/SuZXNAZaAe4ITKjDAc9qKMec6npUgtp0klSxGH4726SUop8ON728+17u7uhd2UZrSqgIzo2XOelJQZsVU6YzItSaUs2KcxzCdPKWFXMBBQg7ZbMtSpIBxs7TeFUFWUdj2LnRBwcNFYwydvtJgqYV50Q7kGId7rkxLArh3V9zeQ4DgyRGzoWilIkFtAjZHwINBnHvwKuu9VBu9QaruQ8z6KFURLlbxwOoxyH5QL0c2lzJQ2jI+IzLpcIob4efczqCrq7OP8EvjwRX5i1izH6osGAXgGjTc4mOgMb0rO3J1ij3SQLlVYCqy8kX8EoUTmOoey+kinSbtV5tg/+NrnM3s1sbUGanShH1FVufT2jeCi353PS93SH0dD3MbnFLbbufP6FXFH/4DX69WNcOmmar7wRTMJFYswtMgFje95htM4TP6GmUbfErfYwPw6wdeLgHdA19ls4M9rjo/iPhC8zrXC3Pa6E0iOSaQB5g+I9+bqpXoRXdbSGPzSeEDZolDWo/6Q+8Ic7Zq8hPeK+/QH0IGCe

Steps to reproduce

Not needed

What is expected?

I'm not sure if this is a bug. When I use defineCustomElement to convert a Vue Component to a Web Component,Import another component into a Vue component, and the style of the other component will not be injected into the shadow root of the custom element.

What is actually happening?

The 2 components of Vue are used as a web component (at least it appears to be in a shadow root), and the styles should be injected into the shadow root

System Info

No response

Any additional comments?

No response

avatar
Nov 30th 2023

Duplicate of #4662