-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathvite.config.ts
30 lines (29 loc) · 929 Bytes
/
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
import { defineConfig, loadEnv } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from "path";
// https://vitejs.dev/config/
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), '');
return {
plugins: [vue()],
resolve: {
alias: {
"@": path.resolve(__dirname, "src"),
"@/apis": path.resolve(__dirname, "src/apis"),
"@/assets": path.resolve(__dirname, "src/assets"),
"@/components": path.resolve(__dirname, "src/components"),
"@/constants": path.resolve(__dirname, "src/constants"),
"@/hooks": path.resolve(__dirname, "src/hooks"),
"@/pages": path.resolve(__dirname, "src/pages"),
"@/routers": path.resolve(__dirname, "src/routers"),
"@/store": path.resolve(__dirname, "src/store")
}
},
base: env.VITE_BASE,
server: {
proxy: {
"/api": env.HOST
}
}
}
})