[Vuejs]-Style missing in vue component library with vite and tailwind

0👍

I was able to resolve the issue by making sure Tailwind can scan my component files.

Tailwind Documentation

If you’ve created your own reusable set of components that are styled
with Tailwind and are importing them in multiple projects, make sure
to configure Tailwind to scan those components for class names:

module.exports = {
  content: [
    './components/**/*.{html,js}',
    './pages/**/*.{html,js}',
    **'./node_modules/@my-company/tailwind-components/**/*.js',**
  ],
  // ...
}

Leave a comment