-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvite.config.js
37 lines (34 loc) · 1.15 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
import { resolve } from "path";
import create_config from "@kucrut/vite-for-wp";
import vue from "@vitejs/plugin-vue";
import AutoImport from "unplugin-auto-import/vite";
import Components from "unplugin-vue-components/vite";
import { ElementPlusResolver } from "unplugin-vue-components/resolvers";
export default create_config("admin/app/src/main.js", "admin/app/dist", {
plugins: [
vue(),
AutoImport({
resolvers: [ElementPlusResolver()],
}),
Components({
resolvers: [ElementPlusResolver()],
}),
],
publicDir: false,
resolve: {
alias: {
"@": resolve(__dirname, "./admin/app/src"),
"@components": resolve(__dirname, "./admin/app/src/components"),
"@stores": resolve(__dirname, "./admin/app/src/stores"),
"@assets": resolve(__dirname, "./admin/app/src/assets"),
"@layouts": resolve(__dirname, "./admin/app/src/layouts"),
"@views": resolve(__dirname, "./admin/app/src/views"),
"@utilities": resolve(__dirname, "./admin/app/src/utilities"),
"@helpers": resolve(__dirname, "./admin/app/src/helpers"),
"@types": resolve(__dirname, "./admin/app/src/types"),
},
},
build: {
sourcemap: false, // disable sourcemap in build.
}
});