Skip to content

Add support for defineCustomElement styles property  #3

@fimion

Description

@fimion

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.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions