Files
flyer-crawler.projectium.com/vite.config.ts
Torben Sorensen 41e3a14925
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 31s
move to using /src - still css issue work
2025-11-12 15:27:55 -08:00

40 lines
923 B
TypeScript

/// <reference types="vitest" />
import path from 'path';
import { defineConfig as defineViteConfig } from 'vite';
import { defineConfig as defineVitestConfig } from 'vitest/config';
import react from '@vitejs/plugin-react';
// 1. Import the Tailwind v4 PostCSS plugin directly
import tailwindcssPostcss from '@tailwindcss/postcss';
const vitestConfig = defineVitestConfig({
test: {
environment: 'jsdom',
setupFiles: ['./src/vitest.setup.ts'], // Correct path after src migration
},
});
const viteConfig = defineViteConfig({
plugins: [react()],
// 2. Define the PostCSS plugins in the Array format Vite expects
css: {
postcss: {
plugins: [
tailwindcssPostcss,
],
},
},
server: {
port: 3000,
host: '0.0.0.0',
},
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
}
},
});
export default { ...viteConfig, test: vitestConfig.test };