generated from Richard-Zhang1019/yu-react-template
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvite.config.ts
36 lines (35 loc) · 781 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
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import { resolve } from 'path'
import { themePreprocessorPlugin } from '@zougt/vite-plugin-theme-preprocessor/dist'
export default defineConfig({
resolve: {
alias: {
'@': resolve(__dirname, './src')
}
},
plugins: [
react(),
themePreprocessorPlugin({
less: {
multipleScopeVars: [
{
scopeName: 'theme-light',
path: resolve('src/assets/style/theme-light.less')
},
{
scopeName: 'theme-dark',
path: resolve('src/assets/style/theme-dark.less')
}
]
}
})
],
css: {
preprocessorOptions: {
less: {
javascriptEnabled: true
}
}
}
})