generated from alshedivat/al-folio
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvite.config.js
103 lines (98 loc) · 2.49 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
import { defineConfig, loadEnv } from "vite";
import vue from "@vitejs/plugin-vue2";
import Sitemap from "vite-plugin-sitemap";
import Uvc from "unplugin-vue-components/vite";
import { BootstrapVueResolver } from "unplugin-vue-components/resolvers";
import path from "path";
const config = defineConfig(({ command, mode }) => {
const root = process.cwd();
const envPrefix = ["VITE_", "VUE_APP_"];
const env = loadEnv(mode, root, envPrefix);
console.log(command, mode, env);
return {
resolve: {
alias: {
"@": path.resolve(__dirname, "src"),
},
extensions: [
".mjs",
".js",
".mts",
".ts",
".jsx",
".tsx",
".json",
".vue",
],
},
server: {
host: "0.0.0.0",
proxy: {
"^/api/": {
target: env.VUE_APP_BASE_API,
changeOrigin: true,
rewrite: (path) => path.replace(new RegExp(`^/api`), ''),
},
},
},
envPrefix,
plugins: [
vue(),
Uvc({
dts: true,
globs: '',
resolvers: [
BootstrapVueResolver()
]
}),
Sitemap({
hostname: env.VUE_APP_BASE_API,
dynamicRoutes: [
"/",
"/maodina",
"/careers",
"/careersDetail",
"/researchPapers",
"/partnerships",
"/contact",
"/community",
"/octopus",
"/beehive",
"/parrot",
"/spider",
"/confidentialAI",
"/cheetah",
"/modelServing",
"/modelMonitoring",
"/web3",
"/sponsorship",
"/aboutus",
"/productOverview",
"/productAIEcosystem",
"/press",
"/weChat",
"/solutionUsecaseSmartCity",
"/solutionUsecaseHealthcare",
"/solutionUsecaseAdvertisement",
"/solutionUsecaseGenerativeAI",
"/solutionUsecaseLogisticsRetail",
"/solutionUsecaseMobility",
"/solutionUsecaseMultiCloud",
"/solutionUsecaseWeb3Blockchain",
"/solutionUsecaseFinTech",
"/solutionModelComputerVision",
"/solutionModelNLP",
"/solutionModelRecommendation",
"/solutionModelGenerativeAI",
"/solutionModelGraphNeuralNetworks",
"/modelsFedCV",
"/modelsFedGraphNN",
"/modelsFedIoT",
"/modelsFedNlp",
"/maodian",
],
}),
],
};
});
export default config;