Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Sharang-heng opened this issue May 10, 2024 · 3 comments
Closed

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

Sharang-heng opened this issue May 10, 2024 · 3 comments
Labels
uni 工程问题 uni 工程安装 vue3

Comments

@Sharang-heng
Copy link

Sharang-heng commented May 10, 2024

由于我需要引用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
请教一下该怎么解决?

@extclp
Copy link

extclp commented May 13, 2024

参考 #4815 (comment)

@zxhbloomer
Copy link

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

@bfc846958672
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
uni 工程问题 uni 工程安装 vue3
Projects
None yet
Development

No branches or pull requests

4 participants