27 lines
691 B
TypeScript
27 lines
691 B
TypeScript
import { fileURLToPath, URL } from 'node:url'
|
||
|
||
import { defineConfig } from 'vite'
|
||
import Components from '@uni-helper/vite-plugin-uni-components'
|
||
import { WotResolver } from '@uni-helper/vite-plugin-uni-components/resolvers'
|
||
import Uni from '@uni-helper/plugin-uni'
|
||
|
||
/**
|
||
* 样式变量共享约定见 .cursor/rules/Uniapp-Scss.mdc:
|
||
* 走 uni.scss 自动注入,不要在此配置 scss.additionalData
|
||
*/
|
||
export default defineConfig({
|
||
resolve: {
|
||
alias: {
|
||
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
||
},
|
||
},
|
||
plugins: [
|
||
Components({
|
||
dts: true,
|
||
resolvers: [WotResolver()],
|
||
}),
|
||
// https://uni-helper.js.org/plugin-uni
|
||
Uni(),
|
||
],
|
||
})
|