-
Hello, I'm trying to setup a component library. Both projects (the ui-library and the "consuming" project) are setup with Vite, React and tailwindcss 4 My two problems:
this is the link to a debug repo: https://github.com/romankoho/LibraryTailwind4 I'd be happy about any input. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
As it stands currently, you have two sets of Tailwind-generated CSS, one from the library and one from the consumer. Some of this would be duplicate or interfere with each other. Instead, consider having consumers compile Tailwind CSS for their own code as well as the library's. In
|
Beta Was this translation helpful? Give feedback.
-
Hey, I am currently working too on a React Tailwind component library. I didnt get it because of the missing @import "tailwindcss"; |
Beta Was this translation helpful? Give feedback.
As it stands currently, you have two sets of Tailwind-generated CSS, one from the library and one from the consumer. Some of this would be duplicate or interfere with each other. Instead, consider having consumers compile Tailwind CSS for their own code as well as the library's.
In
ui-components
:@import
s inui-components/src/lib/tailwind/theme.css
:@source
directive inui-components/src/lib/tailwind/theme.css
: