Is there any way to inline styles with components in vite library build mode? #8563
Unanswered
Nethrenial
asked this question in
Q&A
Replies: 1 comment
-
Use https://github.com/emosheeep/vite-plugin-lib-inject-css and https://vite.dev/config/build-options#build-csscodesplit |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is there any way to inline styles with components in vite library build mode?
I started writing a component library for vue 3 with vite (I set up almost all the things I need, documenting with vuepress included.).But I have no idea how to couple styles with the component itself so my users won't have to include a dist/style.css file (I see this as a problem because there's a huge possibility that the CSS file will be huge in the future considering how customizable I plan to make my components) when they use my components. Vite in library mode builds a single style.css file in the dist directory. Is there any way to internalize CSS styles within the component code itself when building in vite library mode?
Beta Was this translation helpful? Give feedback.
All reactions