uni-app icon indicating copy to clipboard operation
uni-app copied to clipboard

请教一下vite.config.ts改成vite.config.mts相关问题

Open Sharang-heng opened this issue 1 year ago • 2 comments

由于我需要引用unocss image 然后按照他们的建议我将vite.config.ts改成vite.config.mts 代码为

import { defineConfig } from "vite";
import uni from "@dcloudio/vite-plugin-uni";

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [uni()],
});

执行时会报 uni is not a function 请教一下该怎么解决?

Sharang-heng avatar May 10 '24 02:05 Sharang-heng

参考 https://github.com/dcloudio/uni-app/issues/4815#issuecomment-2056579123

extclp avatar May 13 '24 00:05 extclp

似乎cjs也有问题,h5可以,app运行不起来

zxhbloomer avatar May 13 '24 01:05 zxhbloomer

评论区中已有可用的解决方案,关闭本issue。 如还有问题,可 reopen issue 继续讨论。

bfc846958672 avatar Sep 02 '24 05:09 bfc846958672