DenoDDeno
Powered by
vicaryV
Denoβ€’6mo 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
./static/styles.css
to
./assets/style.css
./assets/style.css
and importing it in
client.ts
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
[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;
}
@tailwind base;
@tailwind components;
@tailwind utilities;

[popover]:popover-open {
  @apply text-gray-800;
}
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,934Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Duplicate tailwind classes in Fresh project
rabbit_rabbitRrabbit_rabbit / help
3y ago
[Fresh 2] How to a add tailwind plugins?
vicaryVvicary / help
6mo ago
Deno does not recognize npm import
weegeeWweegee / help
3y ago