Files
resolutionflow/frontend/vite.config.ts
chihlasm d365c38b61 chore: Tailwind CSS v3 → v4 migration (#99)
* chore: run Tailwind v4 upgrade tool (Phase 1)

- Upgraded tailwindcss v3 → v4.2.1, postcss plugin to @tailwindcss/postcss
- Deleted tailwind.config.js, migrated theme to CSS @theme block in index.css
- Replaced @tailwind directives with @import 'tailwindcss'
- Added @custom-variant dark, @utility blocks for custom utilities
- Updated class names across 128 files (shadow-sm → shadow-xs, etc.)
- Removed autoprefixer (built into v4)
- Added migration plan doc

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* chore: switch from @tailwindcss/postcss to @tailwindcss/vite (Phase 2)

- Replaced @tailwindcss/postcss with @tailwindcss/vite plugin
- Deleted postcss.config.js (no longer needed)
- Tailwind now runs as a native Vite plugin for faster HMR

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor: convert to OKLCH colors, move keyframes into @theme (Phase 3-4)

- Replaced all HSL color indirection with direct OKLCH values in @theme
- Moved all keyframes inside @theme block (v4 pattern)
- Eliminated hsl(var(--x)) double-indirection across 17 component files
- Replaced hsl() inline styles with var(--color-*) theme references
- Cleaned up redundant rdp-* utility blocks
- Fixed @custom-variant dark syntax to use :where()
- Added sidebar/glass/shadow vars as OKLCH in :root

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 22:10:44 -05:00

71 lines
1.8 KiB
TypeScript

/// <reference types="vitest/config" />
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import tailwindcss from '@tailwindcss/vite'
import { sentryVitePlugin } from '@sentry/vite-plugin'
import path from 'path'
// https://vite.dev/config/
export default defineConfig({
plugins: [
tailwindcss(),
react(),
sentryVitePlugin({
org: process.env.SENTRY_ORG,
project: process.env.SENTRY_PROJECT,
authToken: process.env.SENTRY_AUTH_TOKEN,
silent: !process.env.SENTRY_AUTH_TOKEN, // Don't error in local dev
}),
],
server: {
host: '0.0.0.0',
watch: {
usePolling: true,
},
},
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
},
},
test: {
globals: true,
environment: 'jsdom',
setupFiles: './src/test/setup.ts',
include: ['src/**/*.{test,spec}.{ts,tsx}'],
},
build: {
sourcemap: 'hidden', // Generate source maps but don't expose them publicly
rollupOptions: {
output: {
manualChunks: {
// React core and routing
'react-vendor': ['react', 'react-dom', 'react-router-dom'],
// Markdown rendering
'markdown-vendor': ['react-markdown'],
// State management
'state-vendor': ['zustand', 'immer', 'zundo'],
// Icons
'icons-vendor': ['lucide-react'],
// Utilities and UI libs
'utils-vendor': [
'axios',
'clsx',
'tailwind-merge',
'class-variance-authority',
'date-fns',
'sonner',
],
// Drag and drop
'dnd-vendor': [
'@dnd-kit/core',
'@dnd-kit/sortable',
'@dnd-kit/utilities',
],
},
},
},
chunkSizeWarningLimit: 500,
},
})