-
Notifications
You must be signed in to change notification settings - Fork 3
/
vite.config.ts
52 lines (51 loc) · 1.21 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
import path from 'path';
import vue from '@vitejs/plugin-vue';
import md from './plugin/md';
import docs from './plugin/docs';
import vueJsx from '@vitejs/plugin-vue-jsx';
import { getThemeVariables } from 'ant-design-vue/dist/theme';
import { additionalData } from './themeConfig';
/**
* @type {import('vite').UserConfig}
*/
export default {
resolve: {
alias: {
// moment: 'moment/dist/moment.js',
'@': path.join(__dirname, './src'),
vue: 'vue/dist/vue.esm-bundler.js',
},
},
plugins: [
vueJsx({
// options are passed on to @vue/babel-plugin-jsx
}),
docs(),
md(),
vue({
include: [/\.vue$/, /\.md$/],
}),
],
optimizeDeps: {
include: [
'fetch-jsonp',
'ant-design-vue/es/locale-provider/zh_CN',
'ant-design-vue/es/locale/en_US',
'ant-design-vue/es/locale/zh_CN',
'ant-design-vue/es/locale-provider/default',
'ant-design-vue/es/vc-drawer/src',
'@ant-design/icons-vue',
'lodash-es',
],
},
css: {
preprocessorOptions: {
less: {
modifyVars: { ...getThemeVariables() },
javascriptEnabled: true,
// includePaths: ["node_modules/"],
additionalData,
},
},
},
};