Open md-moijul opened 5 months ago
This is an issue with Tailwind. There is no option in Tailwind to create component based css files otherwise Tailwind needs to merge all files to check if there are redundant classes and if so, which component should be now implement the styles? If both, the idea of Tailwind wont work because you would have styles twice defined.
Description
When consuming components from
vite-react-component-library-starter
, the Tailwind CSS styles are not automatically applied to the components. To get the styles working, it is currently necessary to manually import the CSS file along with the component. Ideally, importing a component should automatically include its styling without needing an additional import statement for the CSS.Steps to Reproduce
vite-react-component-library-starter
repository:git clone git@github.com:rayyamhk/vite-react-component-library-starter.git
npm install && npm run build:lib
npm link
vite-react-component-library-starter
to it:npm link vite-react-component-library-starter
export default function App() { return ( <>
hello world
}