51 lines
1.2 KiB
TypeScript
51 lines
1.2 KiB
TypeScript
import { defineConfig } from "vite";
|
|
import react from "@vitejs/plugin-react-swc";
|
|
import path from "path";
|
|
import { componentTagger } from "lovable-tagger";
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig(({ mode }) => ({
|
|
server: {
|
|
host: "::",
|
|
port: 8080,
|
|
hmr: {
|
|
overlay: false,
|
|
},
|
|
},
|
|
build: {
|
|
outDir: "dist",
|
|
sourcemap: false,
|
|
minify: "terser",
|
|
chunkSizeWarningLimit: 1000,
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks: {
|
|
"vendor": [
|
|
"react",
|
|
"react-dom",
|
|
"react-router-dom",
|
|
],
|
|
"ui-components": [
|
|
"@radix-ui/react-accordion",
|
|
"@radix-ui/react-alert-dialog",
|
|
"@radix-ui/react-dialog",
|
|
"@radix-ui/react-dropdown-menu",
|
|
"@radix-ui/react-select",
|
|
"@radix-ui/react-tabs",
|
|
],
|
|
"supabase": [
|
|
"@supabase/supabase-js",
|
|
],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
plugins: [react(), mode === "development" && componentTagger()].filter(Boolean),
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "./src"),
|
|
},
|
|
dedupe: ["react", "react-dom", "react/jsx-runtime", "react/jsx-dev-runtime"],
|
|
},
|
|
}));
|