mirror of
https://github.com/tiennm99/ccs.git
synced 2026-07-16 18:16:08 +00:00
51 lines
1.3 KiB
TypeScript
51 lines
1.3 KiB
TypeScript
import { defineConfig } from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
import tailwindcss from '@tailwindcss/vite';
|
|
import path from 'path';
|
|
|
|
// https://vite.dev/config/
|
|
export default defineConfig({
|
|
plugins: [react(), tailwindcss()],
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, './src'),
|
|
},
|
|
},
|
|
build: {
|
|
outDir: '../dist/ui',
|
|
emptyOutDir: true,
|
|
sourcemap: false,
|
|
minify: 'esbuild',
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks: {
|
|
// Vendor chunks - split large dependencies
|
|
'react-vendor': ['react', 'react-dom', 'react-router-dom'],
|
|
'radix-ui': [
|
|
'@radix-ui/react-alert-dialog',
|
|
'@radix-ui/react-dialog',
|
|
'@radix-ui/react-dropdown-menu',
|
|
'@radix-ui/react-label',
|
|
'@radix-ui/react-separator',
|
|
'@radix-ui/react-slot',
|
|
'@radix-ui/react-tooltip',
|
|
],
|
|
'tanstack': ['@tanstack/react-query', '@tanstack/react-table'],
|
|
'form-utils': ['react-hook-form', '@hookform/resolvers', 'zod'],
|
|
'icons': ['lucide-react'],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
server: {
|
|
port: 5173,
|
|
proxy: {
|
|
'/api': 'http://localhost:3000',
|
|
'/ws': {
|
|
target: 'ws://localhost:3000',
|
|
ws: true,
|
|
},
|
|
},
|
|
},
|
|
});
|