50 lines
1.3 KiB
TypeScript
50 lines
1.3 KiB
TypeScript
import { defineConfig } from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
import path from 'path';
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, './src'),
|
|
'@/components': path.resolve(__dirname, './src/components'),
|
|
'@/utils': path.resolve(__dirname, './src/utils'),
|
|
'@/styles': path.resolve(__dirname, './src/styles'),
|
|
'@/types': path.resolve(__dirname, './src/types'),
|
|
},
|
|
},
|
|
server: {
|
|
port: 3000,
|
|
open: true,
|
|
host: true,
|
|
},
|
|
build: {
|
|
outDir: 'dist',
|
|
sourcemap: true,
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks: {
|
|
'react-vendor': ['react', 'react-dom'],
|
|
'ui-vendor': ['lucide-react', 'sonner'],
|
|
'radix-vendor': [
|
|
'@radix-ui/react-accordion',
|
|
'@radix-ui/react-avatar',
|
|
'@radix-ui/react-dialog',
|
|
'@radix-ui/react-dropdown-menu',
|
|
'@radix-ui/react-label',
|
|
'@radix-ui/react-popover',
|
|
'@radix-ui/react-select',
|
|
'@radix-ui/react-tabs',
|
|
],
|
|
},
|
|
},
|
|
},
|
|
chunkSizeWarningLimit: 1000,
|
|
},
|
|
optimizeDeps: {
|
|
include: ['react', 'react-dom', 'lucide-react'],
|
|
},
|
|
});
|
|
|