move to using /src - still css issue work
Some checks failed
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Failing after 18s

This commit is contained in:
2025-11-12 15:20:48 -08:00
parent 9bb90d31a8
commit d215dd919c
2 changed files with 22 additions and 3 deletions

View File

@@ -3,25 +3,34 @@ 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
const vitestConfig = defineVitestConfig({
test: {
environment: 'jsdom',
setupFiles: ['./vitest.setup.ts'],
// FIX: Update path to be relative to the new src directory
setupFiles: ['./src/vitest.setup.ts'],
},
});
const viteConfig = defineViteConfig({
plugins: [react()],
// 2. ADD THIS CSS BLOCK TO EXPLICITLY USE POSTCSS
css: {
postcss,
},
server: {
port: 3000,
host: '0.0.0.0',
},
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
// This alias is now correct with the 'src' directory
'@': path.resolve(__dirname, './src'),
}
},
});
export default { ...viteConfig, test: vitestConfig.test };
export default { ...viteConfig, test: vitestConfig.test };