lycx-hx/vite.config.ts

40 lines
751 B
TypeScript
Raw Normal View History

2024-10-21 09:05:15 +08:00
import path from 'path'
import { defineConfig } from 'vite'
import uni from '@dcloudio/vite-plugin-uni'
import Unocss from 'unocss/vite'
import AutoImport from 'unplugin-auto-import/vite'
// https://vitejs.dev/config/
export default defineConfig({
resolve: {
alias: {
'@/': `${path.resolve(__dirname, 'src')}/`,
},
},
plugins: [
uni(),
// https://github.com/antfu/unocss
Unocss(),
// https://github.com/antfu/unplugin-auto-import
AutoImport({
imports: [
'vue',
'uni-app',
'pinia',
],
dts: true,
vueTemplate: true,
}),
],
css: {
preprocessorOptions: {
scss: {
api: "modern-compiler" // or 'modern'
}
}
},
})