-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathvite.config.js
More file actions
52 lines (50 loc) · 1.33 KB
/
vite.config.js
File metadata and controls
52 lines (50 loc) · 1.33 KB
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
/**
* File: vite.config.js
* Description: Vite build configuration for the Vue frontend application
*
* Author: iBUHUB
*/
const { defineConfig } = require("vite");
const vue = require("@vitejs/plugin-vue");
const packageJson = require("./package.json");
module.exports = defineConfig({
define: {
__APP_VERSION__: JSON.stringify(process.env.VERSION || packageJson.version),
},
base: "/",
build: {
assetsDir: "assets",
emptyOutDir: true,
outDir: "../dist",
},
plugins: [vue()],
publicDir: "../public",
root: "ui/app",
server: {
port: 5173,
proxy: {
// Proxy API requests to the Express backend
"/api": {
changeOrigin: true,
target: "http://localhost:7861",
},
"/health": {
changeOrigin: true,
target: "http://localhost:7861",
},
"/locales": {
changeOrigin: true,
target: "http://localhost:7861",
},
"/login": {
changeOrigin: true,
target: "http://localhost:7861",
},
"/logout": {
changeOrigin: true,
target: "http://localhost:7861",
},
},
strictPort: true,
},
});