-
Notifications
You must be signed in to change notification settings - Fork 10
/
vite.config.ts
43 lines (43 loc) · 1.12 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
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import WindiCSS from "vite-plugin-windicss";
import styleImport from "vite-plugin-style-import";
import { visualizer } from "rollup-plugin-visualizer";
// eslint-disable-next-line import/no-unresolved
import Components from "unplugin-vue-components/vite";
// eslint-disable-next-line import/no-unresolved
import { AntDesignVueResolver } from "unplugin-vue-components/resolvers";
import generateModifyVars from "./build/style/generateModifyVars";
// https://vitejs.dev/config/
export default defineConfig({
build: {
rollupOptions: {
plugins: [visualizer()],
},
},
plugins: [
vue(),
WindiCSS(),
Components({
resolvers: [AntDesignVueResolver()],
dts: true,
}),
styleImport({
libs: [
{
libraryName: "ant-design-vue",
esModule: true,
resolveStyle: (name) => `ant-design-vue/es/${name}/style/index`,
},
],
}),
],
css: {
preprocessorOptions: {
less: {
modifyVars: generateModifyVars(),
javascriptEnabled: true,
},
},
},
});