fix: add astro.config.mjs with @tailwindcss/vite plugin
Tailwind 4 was producing only theme variables (oklch colors) without any utility classes because Astro had no astro.config.mjs wiring the @tailwindcss/vite plugin. Result: site rendered unstyled despite all components and HTML being correct. Verified locally after fix: - CSS bundle grew from 21 KB (theme only) to 36 KB (theme + utilities) - 23 utility-class definitions present (bg-neutral-900, text-white, min-h-screen, backdrop-blur, font-bold, flex etc) Also adds @source directive in global.css to ensure Tailwind scans .astro files for class usage.
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
import { defineConfig } from 'astro/config';
|
||||
import tailwindcss from '@tailwindcss/vite';
|
||||
|
||||
export default defineConfig({
|
||||
vite: {
|
||||
plugins: [tailwindcss()],
|
||||
},
|
||||
});
|
||||
@@ -1 +1,4 @@
|
||||
@import "tailwindcss";
|
||||
|
||||
@source "../**/*.{astro,html,js,jsx,ts,tsx,md,mdx,svelte,vue}";
|
||||
@source "../../public/**/*.html";
|
||||
|
||||
Reference in New Issue
Block a user