Currently, I'm developing a widget that can be embedded on websites using Vue.js along with vue-custom-element. Everything was going well until I encountered an issue.
The problem arises when trying to integrate a component (along with its CSS) from a package such as vue-number-input. Despite my attempts to keep the CSS encapsulated within the shadow root, it ends up being injected into the head of the webpage.
You can observe this behavior in this screenshot, where the CSS from the number input package is placed in the head instead of the shadow root.
I have made all necessary adjustments to ensure that the application functions properly within the shadow root.
To further investigate this issue, I have shared my vue.config.js
, my main.js file (where I register the custom element), and my component (where I import the package's component).
If anyone has insights on how to resolve this issue or if it is even feasible, please share your expertise.