From 41e3a149257892fe2d91546c30851f1996fc0e92 Mon Sep 17 00:00:00 2001 From: Torben Sorensen Date: Wed, 12 Nov 2025 15:27:55 -0800 Subject: [PATCH] move to using /src - still css issue work --- vite.config.ts | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/vite.config.ts b/vite.config.ts index 27882fe3..3d9af379 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -3,22 +3,27 @@ import path from 'path'; import { defineConfig as defineViteConfig } from 'vite'; import { defineConfig as defineVitestConfig } from 'vitest/config'; import react from '@vitejs/plugin-react'; -import postcss from './postcss.config.js'; // <-- 1. IMPORT YOUR POSTCSS CONFIG + +// 1. Import the Tailwind v4 PostCSS plugin directly +import tailwindcssPostcss from '@tailwindcss/postcss'; const vitestConfig = defineVitestConfig({ test: { environment: 'jsdom', - // FIX: Update path to be relative to the new src directory - setupFiles: ['./src/vitest.setup.ts'], + setupFiles: ['./src/vitest.setup.ts'], // Correct path after src migration }, }); const viteConfig = defineViteConfig({ plugins: [react()], - - // 2. ADD THIS CSS BLOCK TO EXPLICITLY USE POSTCSS + + // 2. Define the PostCSS plugins in the Array format Vite expects css: { - postcss, + postcss: { + plugins: [ + tailwindcssPostcss, + ], + }, }, server: { @@ -27,8 +32,7 @@ const viteConfig = defineViteConfig({ }, resolve: { alias: { - // This alias is now correct with the 'src' directory - '@': path.resolve(__dirname, './src'), + '@': path.resolve(__dirname, './src'), } }, });