-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
47 lines (43 loc) · 1.2 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
import { defineConfig } from "vite";
import path from "path";
import Vue from "@vitejs/plugin-vue";
import { createSvgIconsPlugin } from "vite-plugin-svg-icons";
import VueDevTools from "vite-plugin-vue-devtools";
import AddonsRouter from "./src/plugins/addons";
export default defineConfig({
server: {
fs: {
allow: [".", "../add-on"],
},
},
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
"@pages": path.resolve(__dirname, "./src/pages"),
"@proto": path.resolve(__dirname, "./src/proto"),
"@protobuf-ts": path.resolve(__dirname, "./node_modules/@protobuf-ts"),
"@addon": path.resolve(__dirname, "../add-on"),
},
extensions: [".js", ".mjs", ".ts", ".json", ".vue"],
},
plugins: [
VueDevTools(),
AddonsRouter(),
Vue(),
createSvgIconsPlugin({
iconDirs: [path.resolve(process.cwd(), "./src/assets/icons")],
symbolId: "icon-[dir]-[name]",
}),
],
//build: {
// rollupOptions: {
// output: {
// manualChunks(id) {
// if (id.includes("node_modules")) {
// return id.toString().split("node_modules/")[1].split("/")[0].toString();
// }
// },
// },
// },
//},
});