-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
使用CLI TS 增量编译微信小程序报错 #5061
Comments
经排查是@vitejs/[email protected]最新版本引发的兼容性问题,临时解决方案,可以根据自己使用的包管理工具,来锁定内部依赖@vitejs/plugin-vue版本为5.0.4,比如 yarn 的话,通过package.json中配置 "resolutions": {
"@vitejs/plugin-vue": "5.0.4"
} |
@fxy060608 非常感谢您的帮助~ 问题已通过您的办法解决 |
This was referenced Jul 26, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
使用CLI +TS
"@dcloudio/vite-plugin-uni": "3.0.0-4020420240722002"
使用该版本 增量编译微信小程序时 提示如下:
开始差量编译...
[plugin:commonjs] Transform failed with 1 error:
D:/dev/my-vue3-project/src/App.vue?vue&type=script&setup=true&lang.ts:1:8: ERROR: Expected ">" but found "setup"
at App.vue:1:8
Expected ">" but found "setup"
1 | <script setup lang="ts">
| ^
2 | import { onLaunch, onShow, onHide } from "@dcloudio/uni-app";
3 | onLaunch(() => {
使用 "@dcloudio/vite-plugin-uni": "3.0.0-4000820240401001" 则正常编译
使用官网文档中的 npx degit dcloudio/uni-preset-vue#vite-ts my-vue3-project 创建项目即可复现
The text was updated successfully, but these errors were encountered: