|
|
@@ -1,7 +1,7 @@
|
|
|
import { defineConfig } from 'vite'
|
|
|
import uni from '@dcloudio/vite-plugin-uni'
|
|
|
import AutoImport from 'unplugin-auto-import/vite'
|
|
|
-import UniComponents from '@uni-helper/vite-plugin-uni-components'
|
|
|
+import Components from '@uni-helper/vite-plugin-uni-components'
|
|
|
import { WotResolver } from '@uni-helper/vite-plugin-uni-components/resolvers'
|
|
|
|
|
|
export default defineConfig(async () => {
|
|
|
@@ -10,27 +10,18 @@ export default defineConfig(async () => {
|
|
|
return {
|
|
|
plugins: [
|
|
|
tsconfigPaths(),
|
|
|
-
|
|
|
- uni(),
|
|
|
-
|
|
|
AutoImport({
|
|
|
imports: ['vue', 'pinia'],
|
|
|
dts: 'src/auto-imports.d.ts',
|
|
|
}),
|
|
|
|
|
|
// ✅ 用 uni-helper 的组件插件
|
|
|
- UniComponents({
|
|
|
- dts: 'src/components.d.ts',
|
|
|
+ Components({
|
|
|
resolvers: [WotResolver()],
|
|
|
}),
|
|
|
+ uni(),
|
|
|
],
|
|
|
|
|
|
- css: {
|
|
|
- preprocessorOptions: {
|
|
|
- scss: {
|
|
|
- quietDeps: true,
|
|
|
- },
|
|
|
- },
|
|
|
- },
|
|
|
+ css: {},
|
|
|
}
|
|
|
})
|