This repository was archived by the owner on Aug 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
73 lines (69 loc) · 2.13 KB
/
vite.config.ts
File metadata and controls
73 lines (69 loc) · 2.13 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
import { promises as fs } from "node:fs";
import VueI18n from "@intlify/unplugin-vue-i18n/vite";
import vue from "@vitejs/plugin-vue";
import path from "path";
import AutoImport from "unplugin-auto-import/vite";
import IconsResolver from "unplugin-icons/resolver";
import Icons from "unplugin-icons/vite";
import { BootstrapVueNextResolver } from "unplugin-vue-components/resolvers";
import Components from "unplugin-vue-components/vite";
import { defineConfig } from "vite";
import eslintPlugin from "vite-plugin-eslint";
import Pages from "vite-plugin-pages";
export default defineConfig({
plugins: [
vue(),
Icons({
autoInstall: true,
customCollections: {
// key as the collection name
"extra-icons": {
brokenLightbulb: () =>
fs.readFile("./public/broken-lightbulb.svg", "utf-8"),
},
},
}),
eslintPlugin({
exclude: [
`node_modules/**`,
`${path.resolve(__dirname, "../..")}/node_modules/**`,
`${path.resolve(__dirname, "../..")}/packages/**`,
"dist/**",
],
}),
AutoImport({
dts: true,
imports: ["vue", "vue-router", "vue-i18n", "pinia"],
vueTemplate: true,
dirs: ["../../packages/api-routes"],
}),
Components({
resolvers: [BootstrapVueNextResolver(), IconsResolver({})],
dts: true,
}),
Pages(),
// https://github.com/intlify/bundle-tools/tree/main/packages/unplugin-vue-i18n
VueI18n({
runtimeOnly: false,
compositionOnly: true,
include: [path.resolve(__dirname, "..", "translations/**")],
}),
],
resolve: {
alias: {
"~": path.resolve(__dirname, "src"),
"~dumili-types/": `${path.resolve(__dirname, "types")}/`,
"~dm-types/": `${path.resolve(__dirname, "../../packages/types")}/`,
"~web/": `${path.resolve(__dirname, "../web")}/`,
"~axios-helper/": `${path.resolve(
__dirname,
"../../packages/axios-helper"
)}/`,
"~api-routes/": `${path.resolve(
__dirname,
"../../packages/api-routes"
)}/`,
"~translations": path.resolve(__dirname, "translations"),
},
},
});