1***@qq.com
- 发布:2023-05-17 18:16
- 更新:2024-01-30 14:37
- 阅读:338
vite+vue3创建的项目,package.json里配置"type": "module"后,再pnpm dev:mp-wexin就报“uni is not a function”
分类:uni-app
EthanZhong - coding
import { type Plugin, defineConfig } from 'vite';
import type { VitePluginUniOptions } from '@dcloudio/vite-plugin-uni';
import * as uni from '@dcloudio/vite-plugin-uni';
const uniPlugin = (uni.default as any).default as (
rawOptions?: VitePluginUniOptions
) => Plugin[];
// https://vitejs.dev/config/
export default defineConfig({
plugins: [uniPlugin()],
});