move to using /src - still css issue work
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 31s
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 31s
This commit is contained in:
@@ -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'),
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user