Upgrade to Tailwind CSS v4

Migrate from v3's JS config + PostCSS to v4's CSS-first setup using the @tailwindcss/vite plugin. Theme tokens move into @theme inline in src/index.css, tailwindcss-animate is replaced by tw-animate-css, and the container utility is redeclared via @utility. A compatibility layer preserves v3's default border color so existing shadcn/ui components render unchanged. Also exclude .agents/** (and other non-source dirs) from the Vitest run.
This commit is contained in:
Alex Gleason committed 2026-04-26 20:51:29 -05:00
1 parent b5043195d9
commit f0a92e5475
7 files changed
+455 -1020

No files matched your search

+8
View File
@@ -1,6 +1,7 @@
import path from "node:path";
import react from "@vitejs/plugin-react";
import tailwindcss from "@tailwindcss/vite";
import { defineConfig } from "vitest/config";
// https://vitejs.dev/config/
@@ -11,11 +12,18 @@ export default defineConfig(() => ({
},
plugins: [
react(),
tailwindcss(),
],
test: {
globals: true,
environment: 'jsdom',
setupFiles: './src/test/setup.ts',
exclude: [
'**/node_modules/**',
'**/dist/**',
'**/{vite,eslint}.config.*',
'.agents/**',
],
onConsoleLog(log) {
return !log.includes("React Router Future Flag Warning");
},