-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
61 lines (60 loc) · 1.83 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
54
55
56
57
58
59
60
61
import VueI18nPlugin from "@intlify/unplugin-vue-i18n/vite";
import { VarletImportResolver } from "@varlet/import-resolver";
import vue from "@vitejs/plugin-vue";
import { visualizer } from "rollup-plugin-visualizer";
import autoImport from "unplugin-auto-import/vite";
import UnpluginDetectDuplicatedDeps from "unplugin-detect-duplicated-deps/vite";
import IconsResolver from "unplugin-icons/resolver";
import Icons from "unplugin-icons/vite";
import components from "unplugin-vue-components/vite";
import { defineConfig } from "vite";
import { analyzer } from "vite-bundle-analyzer";
import Inspect from "vite-plugin-inspect";
import vueDevTools from "vite-plugin-vue-devtools";
export default defineConfig({
plugins: [
vue(),
components({
resolvers: [
VarletImportResolver(),
IconsResolver({
prefix: "i",
}),
],
}),
autoImport({
include: [
/\.[tj]sx?$/, // .ts, .tsx, .js, .jsx
/\.vue$/,
/\.vue\?vue/, // .vue
/\.md$/, // .md
],
imports: ["vue", "vue-router"],
resolvers: [VarletImportResolver({ autoImport: true })],
}),
VueI18nPlugin({
include: "./src/i18n/locales/**.{json}",
compositionOnly: true,
}),
Icons(),
UnpluginDetectDuplicatedDeps(),
Inspect(),
analyzer({
defaultSizes: "gzip",
}),
visualizer(),
vueDevTools(),
],
server: {
host: "0.0.0.0",
port: 9000,
proxy: {
"/api": {
target: "http://127.0.0.1:35271",
},
"/.well-known": {
target: "http://127.0.0.1:35271",
},
},
},
});