38 lines
876 B
TypeScript
38 lines
876 B
TypeScript
import { defineConfig } from "vite"
|
|
import react from "@vitejs/plugin-react"
|
|
import path from "node:path"
|
|
|
|
// https://vite.dev/config/
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "./src"),
|
|
},
|
|
},
|
|
build: {
|
|
sourcemap: false,
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks: {
|
|
'react-vendor': ['react', 'react-dom', 'react-router-dom'],
|
|
'ui-vendor': ['@radix-ui/react-avatar', '@radix-ui/react-dialog', '@radix-ui/react-dropdown-menu', '@radix-ui/react-select'],
|
|
'chart-vendor': ['recharts'],
|
|
'query-vendor': ['@tanstack/react-query'],
|
|
},
|
|
},
|
|
},
|
|
chunkSizeWarningLimit: 1000,
|
|
},
|
|
server: {
|
|
port: 5173,
|
|
strictPort: false,
|
|
host: true,
|
|
},
|
|
preview: {
|
|
port: 4173,
|
|
strictPort: false,
|
|
host: true,
|
|
},
|
|
})
|