-
Notifications
You must be signed in to change notification settings - Fork 1
/
vite.config.ts
44 lines (42 loc) · 976 Bytes
/
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 react from '@vitejs/plugin-react'
import path from 'path'
import { defineConfig } from 'vite'
import utools from 'vite-plugin-utools'
export default defineConfig({
resolve: {
alias: [
{
find: /^~/,
replacement: '',
},
],
},
css: {
preprocessorOptions: {
less: {
javascriptEnabled: true,
modifyVars: {
// ant design 4.17 版本会有 less 报错,添加这个处理,之后版本看是否需要移除该项
// 相关链接:https://githubmemory.com/repo/ant-design/ant-design-pro/issues/9082
'root-entry-name': 'default',
},
},
},
},
plugins: [
react(),
utools({
external: 'uTools',
preload: {
path: './src/preload.ts',
watch: true,
name: 'window.preload',
},
buildUpx: false,
}),
],
build: {
outDir: '/mnt/c/code/utools/find-repeat-file-utools',
emptyOutDir: true
},
})