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

Add support for defineCustomElement styles property #3

Open
fimion opened this issue Nov 29, 2021 · 1 comment
Open

Add support for defineCustomElement styles property #3

fimion opened this issue Nov 29, 2021 · 1 comment

Comments

@fimion
Copy link

fimion commented Nov 29, 2021

With the release of vue 3.2, defineCustomElement is officially supported and it has a specialized property called styles that can be added on that will append the styles in the shadow dom.

Sadly, this property is not handled in the compiler but in the bundler (here is vite's method for dealing with it):

https://github.com/vitejs/vite/blob/1809fccab6267a68336b8374428a88c0514f4ac7/packages/plugin-vue/src/main.ts#L340-L345

We are looking to be able to leverage using custom elements at work with vue3, and we are using your plugin as part of our build process. Would it be possible to get some form of support for appending styles for custom elements?

Let me know if you would like more information (I can also attempt helping to make a PR for it.)

@pipe01
Copy link
Owner

pipe01 commented Nov 29, 2021

Absolutely. It'd be really helpful if you could send me an MVP that uses this feature, that way I can easily test it out.

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

No branches or pull requests

2 participants