-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
121 lines (120 loc) · 3.12 KB
/
vite.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import path from "path";
import { visualizer } from "rollup-plugin-visualizer";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
react(),
visualizer({
template: "treemap",
open: true,
gzipSize: true,
}),
],
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
"@components": path.resolve(__dirname, "./src/components"),
"@pages": path.resolve(__dirname, "./src/pages"),
"@lib": path.resolve(__dirname, "./src/lib"),
"@features": path.resolve(__dirname, "./src/features"),
"@auth": path.resolve(__dirname, "./src/auth"),
"@utils": path.resolve(__dirname, "./src/utils"),
"@types": path.resolve(__dirname, "./src/types"),
"@hooks": path.resolve(__dirname, "./src/hooks"),
"@services": path.resolve(__dirname, "./src/services"),
"@transactions": path.resolve(__dirname, "./src/components/transactions"),
},
extensions: [".js", ".jsx", ".ts", ".tsx"],
},
server: {
host: "0.0.0.0",
port: 5173,
strictPort: true,
allowedHosts: [
"localhost",
"*.replit.dev",
"*.repl.co",
"*.repl.it",
"*.riker.replit.dev",
".replit.dev",
".repl.co",
".repl.it"
],
watch: {
usePolling: true,
interval: 100,
},
hmr: {
overlay: false,
},
},
preview: {
port: 5173,
host: true,
allowedHosts: [
"localhost",
"*.replit.dev",
"*.repl.co",
"*.repl.it",
"*.riker.replit.dev",
".replit.dev",
".repl.co",
".repl.it"
],
},
build: {
outDir: "dist",
sourcemap: true,
target: "esnext",
minify: "esbuild",
chunkSizeWarningLimit: 3000,
esbuild: {
logOverride: {
"duplicate-object-key": "silent",
"this-is-undefined-in-esm": "silent",
},
logLevel: "warning",
},
rollupOptions: {
output: {
manualChunks: {
"vendor-react": ["react", "react-dom"],
"vendor-router": ["react-router-dom"],
"vendor-ui": ["@headlessui/react"],
"vendor-icons": ["lucide-react"],
"vendor-forms": ["react-hook-form", "@hookform/resolvers"],
"vendor-state": ["zustand"],
"vendor-query": ["@tanstack/react-query"],
"vendor-auth": ["@supabase/supabase-js"],
"vendor-utils": ["date-fns", "i18next"],
"vendor-cytoscape": ["cytoscape"],
"vendor-katex": ["katex"],
"vendor-charts": [
"@/features/shared/analytics/charts/LineChart",
"@/features/dashboard/shared/widgets/charts/LineChart",
"@/components/charts/LineChart",
"recharts",
"chart.js",
"react-chartjs-2",
],
},
},
},
},
optimizeDeps: {
include: [
"react",
"react-dom",
"react-router-dom",
"@headlessui/react",
"lucide-react",
"zustand",
"@supabase/supabase-js",
"react-hot-toast",
"react-scroll",
],
},
assetsInclude: ["**/*.md"],
});