-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
34 lines (33 loc) · 924 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
31
32
33
34
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import path from "path";
// https://vitejs.dev/config/
export default defineConfig({
server: {
proxy: {
"/api": {
target: "http://localhost:8080",
changeOrigin: true,
},
},
},
resolve: {
alias: {
"@src": path.resolve(__dirname, "./src"),
"@api": path.resolve(__dirname, "./src/api"),
"@components": path.resolve(__dirname, "./src/components"),
"@pages": path.resolve(__dirname, "./src/pages"),
"@utils": path.resolve(__dirname, "./src/utils"),
"@constants": path.resolve(__dirname, "./src/constants"),
"@models": path.resolve(__dirname, "./src/models"),
"@assets": path.resolve(__dirname, "./src/assets"),
"@redux": path.resolve(__dirname, "./src/redux"),
"@services": path.resolve(__dirname, "./src/services"),
},
},
build: {
outDir: "dist",
},
base: "./",
plugins: [react()],
});