You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
737 B
35 lines
737 B
8 months ago
|
import { defineConfig } from 'vite'
|
||
|
import uni from '@dcloudio/vite-plugin-uni'
|
||
|
import path from 'path'
|
||
|
import Unocss from 'unocss/vite'
|
||
|
|
||
|
// https://vitejs.dev/config/
|
||
|
export default defineConfig({
|
||
|
plugins: [
|
||
|
uni(),
|
||
|
// https://github.com/antfu/unocss
|
||
|
Unocss()
|
||
|
],
|
||
|
server: {
|
||
|
port: 81,
|
||
|
host: '0.0.0.0',
|
||
|
},
|
||
|
resolve: {
|
||
|
alias: {
|
||
|
'@': path.resolve(__dirname, './src'),
|
||
|
'@components': path.resolve(__dirname, './src/components')
|
||
|
}
|
||
|
},
|
||
|
css: {
|
||
|
// 配置`scss`和`less`全局变量
|
||
|
preprocessorOptions: {
|
||
|
scss: {
|
||
|
additionalData: '@import "@/styles/vars/_base.scss";'
|
||
|
},
|
||
|
less: {
|
||
|
additionalData: '@import "@/styles/vars/_base.less";'
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
})
|