-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
29 lines (28 loc) · 796 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
import react from "@vitejs/plugin-react-swc";
import { resolve } from "path";
import { defineConfig } from "vite";
// https://vitejs.dev/config/
export default defineConfig({
resolve: {
alias: {
"@": resolve(__dirname, "./src"),
apis: resolve(__dirname, "./src/apis"),
assets: resolve(__dirname, "./src/assets"),
components: resolve(__dirname, "./src/components"),
layouts: resolve(__dirname, "./src/layouts"),
pages: resolve(__dirname, "./src/pages"),
utils: resolve(__dirname, "./src/utils"),
},
},
plugins: [react()],
server: {
proxy: {
"/api": {
target: "https://localhost:5000/",
changeOrigin: true,
secure: false,
// rewrite: (path) => path.replace(/^\/api/, ""),
},
},
},
});