All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 31s
40 lines
923 B
TypeScript
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 }; |