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

Open
Sharang-heng opened this issue May 10, 2024 · 2 comments
Open

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

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

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运行不起来

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants