-
Notifications
You must be signed in to change notification settings - Fork 1
/
vite.config.ts
34 lines (33 loc) · 1.23 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
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import path from "path";
import viteSvgIcons from "vite-plugin-svg-icons";
// https://vitejs.dev/config/
export default defineConfig(({ command, mode }) => ({
base: mode === "production" ? "/tai-walk/" : "/",
plugins: [
react(),
viteSvgIcons({
// Specify the icon folder to be cached
iconDirs: [path.resolve(process.cwd(), "src/assets/icons")],
// Specify symbolId format
symbolId: "[name]"
})
],
resolve: {
alias: {
"@/": path.resolve(__dirname, "./src"),
"@/components": path.resolve(__dirname, "./src/components"),
"@/styles": path.resolve(__dirname, "./src/styles"),
"@/utils": path.resolve(__dirname, "./src/utils"),
"@/assets": path.resolve(__dirname, "./src/assets"),
"@/pages": path.resolve(__dirname, "./src/pages"),
"@/routes": path.resolve(__dirname, "./src/routes"),
"@/hooks": path.resolve(__dirname, "./src/hooks"),
"@/context": path.resolve(__dirname, "./src/context"),
"@/constants": path.resolve(__dirname, "./src/constants"),
"@/api": path.resolve(__dirname, "./src/api"),
"@/types": path.resolve(__dirname, "./src/types")
}
}
}));