-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.js
More file actions
50 lines (49 loc) · 1.57 KB
/
vite.config.js
File metadata and controls
50 lines (49 loc) · 1.57 KB
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
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import tailwindcss from "@tailwindcss/vite";
import { fileURLToPath } from "node:url";
export default defineConfig(() => ({
plugins: [tailwindcss(), react()],
base: "/portfolio-react/",
resolve: {
alias: {
"@": fileURLToPath(new URL("./src", import.meta.url)),
"@components": fileURLToPath(
new URL("./src/components", import.meta.url),
),
"@pages": fileURLToPath(new URL("./src/pages", import.meta.url)),
"@assets": fileURLToPath(new URL("./src/assets", import.meta.url)),
"@utils": fileURLToPath(new URL("./src/utils", import.meta.url)),
"@hooks": fileURLToPath(new URL("./src/hooks", import.meta.url)),
"@data": fileURLToPath(new URL("./src/data", import.meta.url)),
},
},
server: {
port: 3000,
open: true,
},
build: {
outDir: "build",
sourcemap: "hidden",
target: "esnext",
minify: "esbuild",
cssCodeSplit: true,
rollupOptions: {
output: {
manualChunks: {
vendor: ["react", "react-dom"],
icons: ["react-icons", "lucide-react"],
animations: ["motion"],
threejs: ["three", "@react-three/fiber", "@react-three/drei"],
particles: ["@tsparticles/react", "@tsparticles/slim"],
},
},
},
chunkSizeWarningLimit: 1000,
},
test: {
environment: "jsdom",
globals: true,
setupFiles: ["./src/__tests__/setup.ts"],
},
}));