2026-05-07 02:18:36 +08:00
|
|
|
import { defineConfig } from 'vite';
|
|
|
|
|
import react from '@vitejs/plugin-react';
|
|
|
|
|
import path from 'path';
|
2026-05-07 03:36:22 +08:00
|
|
|
import tailwindcss from 'tailwindcss';
|
|
|
|
|
import autoprefixer from 'autoprefixer';
|
2026-05-07 02:18:36 +08:00
|
|
|
|
|
|
|
|
export default defineConfig({
|
|
|
|
|
plugins: [react()],
|
|
|
|
|
resolve: {
|
|
|
|
|
alias: {
|
|
|
|
|
'@': path.resolve(__dirname, 'src'),
|
|
|
|
|
},
|
|
|
|
|
},
|
2026-05-07 03:36:22 +08:00
|
|
|
css: {
|
|
|
|
|
postcss: {
|
|
|
|
|
plugins: [
|
|
|
|
|
tailwindcss({
|
|
|
|
|
content: ['./index.html', './src/**/*.{ts,tsx}'],
|
|
|
|
|
darkMode: 'class',
|
|
|
|
|
theme: {
|
|
|
|
|
extend: {
|
|
|
|
|
colors: {
|
2026-05-07 03:48:14 +08:00
|
|
|
border: 'hsl(240 5.9% 90%)',
|
|
|
|
|
input: 'hsl(240 5.9% 90%)',
|
|
|
|
|
ring: 'hsl(240 5% 64.9%)',
|
|
|
|
|
background: 'hsl(0 0% 100%)',
|
|
|
|
|
foreground: 'hsl(240 10% 3.9%)',
|
2026-05-07 03:36:22 +08:00
|
|
|
primary: {
|
2026-05-07 03:48:14 +08:00
|
|
|
DEFAULT: 'hsl(240 5.9% 10%)',
|
|
|
|
|
foreground: 'hsl(0 0% 98%)',
|
2026-05-07 03:36:22 +08:00
|
|
|
},
|
|
|
|
|
secondary: {
|
2026-05-07 03:48:14 +08:00
|
|
|
DEFAULT: 'hsl(240 4.8% 95.9%)',
|
|
|
|
|
foreground: 'hsl(240 5.9% 10%)',
|
2026-05-07 03:36:22 +08:00
|
|
|
},
|
|
|
|
|
muted: {
|
2026-05-07 03:48:14 +08:00
|
|
|
DEFAULT: 'hsl(240 4.8% 95.9%)',
|
|
|
|
|
foreground: 'hsl(240 3.8% 46.1%)',
|
2026-05-07 03:36:22 +08:00
|
|
|
},
|
|
|
|
|
accent: {
|
2026-05-07 03:48:14 +08:00
|
|
|
DEFAULT: 'hsl(240 4.8% 95.9%)',
|
|
|
|
|
foreground: 'hsl(240 5.9% 10%)',
|
2026-05-07 03:36:22 +08:00
|
|
|
},
|
|
|
|
|
destructive: {
|
2026-05-07 03:48:14 +08:00
|
|
|
DEFAULT: 'hsl(0 84.2% 60.2%)',
|
2026-05-07 03:36:22 +08:00
|
|
|
foreground: 'hsl(0 0% 98%)',
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
borderRadius: {
|
|
|
|
|
lg: '0.5rem',
|
|
|
|
|
md: 'calc(0.5rem - 2px)',
|
|
|
|
|
sm: 'calc(0.5rem - 4px)',
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
plugins: [],
|
|
|
|
|
}),
|
|
|
|
|
autoprefixer(),
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
},
|
2026-05-07 02:18:36 +08:00
|
|
|
server: {
|
|
|
|
|
port: 5173,
|
|
|
|
|
proxy: {
|
2026-05-07 03:26:22 +08:00
|
|
|
'/api': 'http://localhost:3007',
|
2026-05-07 02:18:36 +08:00
|
|
|
'/ws': {
|
2026-05-07 03:26:22 +08:00
|
|
|
target: 'ws://localhost:3007',
|
2026-05-07 02:18:36 +08:00
|
|
|
ws: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
});
|