vicaryV
Denoβ€’4mo agoβ€’
9 replies
vicary

[Fresh 2] tailwind-plugin does not recognize @apply utility classes

I am migrating from Fresh 1 to Fresh 2. Simply moving my stylesheet from ./static/styles.css to ./assets/style.css and importing it in
client.ts
crashes the vite dev server with the following excerpt.
[vite] (client) Pre-transform error: Cannot apply unknown utility class `text-gray-800`. Are you using CSS modules or similar and missing `@reference`? https://tailwindcss.com/docs/functions-and-directives#reference-directive
  Plugin: @tailwindcss/vite:generate:serve
  File: ./assets/styles.css

And here is a minimal crop from my styles.css
@tailwind base;
@tailwind components;
@tailwind utilities;

[popover]:popover-open {
  @apply text-gray-800;
}
Was this page helpful?