Reputation: 216
I have two repositories:
Build my own component library using vite, vue3 and tailwindcss
When I use npm run dev
I can se my components working fine (from the vite app) but when I build my library npm run build:watch
and import them in another project (nuxt app) tailwind classes/styles are not working
This is mi vite app (all good)
This is the nuxt app where I imported the component (no style)
Repositories:
Upvotes: 4
Views: 4148
Reputation: 216
Adding this to package.json
on the vite-libray
"exports": {
"./dist/style.css": "./dist/style.css"
},
And addin this nuxt.config.ts
css: [
"clau-components/dist/style.css"
],
The issues was that I wasn't adding the styles
Upvotes: 4