1***@163.com
1***@163.com
  • 发布:2024-04-29 18:36
  • 更新:2024-04-29 18:36
  • 阅读:392

使用unocss运行报错

分类:uni-app

使用unocss运行报错运行dev:weixin 报require() of ES Module xxx not supported.
Instead change the require of xxx to a dynamic import() which is available in all CommonJS modules.

vite.config.js是
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: [UnoCSS(), uni()],
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
}
}
})

vite-plugin-uni版本是 3.0.0-4000820240401001
unocss版本是0.59.4

2024-04-29 18:36 负责人:无 分享
已邀请:

要回复问题请先登录注册