-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathvite.config.mts
52 lines (51 loc) · 1.06 KB
/
vite.config.mts
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
import { TanStackRouterVite } from "@tanstack/router-vite-plugin";
import react from "@vitejs/plugin-react";
import Icons from "unplugin-icons/vite";
import { defineConfig } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";
import path from "node:path";
export default defineConfig({
plugins: [
react({
include: "**/*.tsx",
}),
TanStackRouterVite({
quoteStyle: "double",
}),
tsconfigPaths(),
Icons({
compiler: "jsx",
jsx: "react",
iconCustomizer(_1, _2, props) {
props.width = "1.5rem";
props.height = "1.5rem";
props.className = "pointer-events-none";
},
}),
],
resolve: {
alias: {
"@": path.resolve(__dirname, "./"),
},
},
server: {
proxy: {
"/api": {
target: "http://localhost:5174",
},
},
},
build: {
outDir: "build/client",
minify: "terser",
terserOptions: {
compress: {
drop_console: true,
drop_debugger: true,
},
format: {
comments: false,
},
},
},
});