-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
53 lines (50 loc) · 1.59 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import { fileURLToPath } from "node:url";
const isLocalDev = process.env.DEV === "local";
if (isLocalDev) {
console.warn("Running in local dev mode");
}
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
assetsInclude: ["docs/**"],
resolve: {
alias: {
...(isLocalDev
? {
// This can be usefull to test the local version of the vue component annotated text before release
// to use this, you need to symlink the vue_component_annotated_text root folder to the root of this project
"@ghentcdh/vue-component-annotated-text/style.css": fileURLToPath(
new URL("./vue_component_annotated_text/dist/style.css", import.meta.url),
),
"@ghentcdh/vue-component-annotated-text": fileURLToPath(
new URL("./vue_component_annotated_text/src/index.ts", import.meta.url),
),
}
: {}),
"@/types": fileURLToPath(new URL("./src/types", import.meta.url)),
},
},
server: {
proxy: {
// string shorthand
// with options
"/text": {
target: "http://localhost:8080",
// target: "https://dev.evwrit.ugent.be",
changeOrigin: true,
},
"/annotation": {
target: "http://localhost:8080",
// target: "https://dev.evwrit.ugent.be",
changeOrigin: true,
},
"/health": {
target: "http://localhost:8080",
// target: "https://dev.evwrit.ugent.be",
changeOrigin: true,
},
},
},
});