Creating Custom Element from SFC that also imports the SFC's styles

This page summarizes the projects mentioned and recommended in the original post on reddit.com/r/vuejs

Our great sponsors
  • Appwrite - The Open Source Firebase alternative introduces iOS support
  • Scout APM - Less time debugging, more time building
  • SonarQube - Static code analysis for 29 languages.
  • vue-loader

    📦 Webpack loader for Vue.js components

    I am would like to have the added benefits of the encapsulated ShadowDOM on a Custom element, but would also like the versatility of keeping my SFCs as SFCs so that I can use them and any content placed in their slots as I normally would, without having to take the added encapsulation of the Shadow DOM into consideration if possible. Another developer had previously mentioned wanting an easy way to import styles from a SFC into a Custom element in this post, and Evan You replied that it is possible, but I was unable to find an example of it being done.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts