-
Notifications
You must be signed in to change notification settings - Fork 2
/
vite.config.js
55 lines (54 loc) · 1.3 KB
/
vite.config.js
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
53
54
55
import { defineConfig, splitVendorChunkPlugin } from "vite";
import vue from "@vitejs/plugin-vue";
import path from "path";
export default defineConfig({
plugins: [
vue({
template: {
compilerOptions: {
isCustomElement: (tag) =>
tag.includes("bx-") ||
tag.includes("dds-") ||
tag.includes("cds-") ||
tag.includes("c4d-"),
},
},
}),
splitVendorChunkPlugin(),
],
define: {
process: {},
"process.env": {},
},
transpileDependencies: true,
base: process.env.NODE_ENV === "production" ? "/registry-ui/" : "/",
server: {
proxy: {
"^/registry-ui/backend/": {
target: "http://0.0.0.0:8085",
changeOrigin: true,
rewrite: (path) => path.replace(/registry-ui\/backend/, ""),
},
},
},
preview: {
host: "localhost",
port: "8080",
proxy: {
"/registry-ui/registry-ui/": {
target: "http://localhost:8080",
rewrite: (path) => path.replace(/registry-ui/, ""),
},
"^/registry-ui/backend/": {
target: "http://0.0.0.0:8085",
changeOrigin: true,
rewrite: (path) => path.replace(/registry-ui\/backend/, ""),
},
},
},
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
});