-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
编译后的代码 taro.js 和 verdors.js 循环引用 #16424
Comments
taro-bot2
bot
added
F-vue3
Framework - Vue 3
T-weapp
Target - 编译到微信小程序
V-3
Version - 3.x
labels
Aug 30, 2024
This was referenced Aug 31, 2024
感谢反馈,可以使用自定义的vite插件或者taro的hooks ModifyViteConfig 来尝试修改这块chunks 的拆分,Taro 后续会针对这个问题进行更好的优化~ |
我也是这个问题, 而且我是taro-cli4.0.4 init后使用taro-ui模板 直接就不能启动. 搞笑 |
你是怎么解决的? 如果有了解决办法希望告知我一下 |
老哥有啥解决方案么,我也遇到这个问题 |
你这边问题解决了嘛,我发现现在App.use一个插件很容易失败导致服务起不来 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
相关平台
微信小程序
小程序基础库: 3.5.2
使用框架: Vue 3
复现步骤
使用 vite vue3 时 编译的产物 taro.js 可能需要 babel 的代码 比如 @babel/helpers/lib/helpers/typeof.js, 现在的分包策略会导致其被打包进 vendors.js 从而导致循环引用
本地测试,
taro/packages/taro-vite-runner/src/mini/config.ts
Line 189 in eefb302
加上
/@babel\//.test(id)
打包到 taro.js 可以解决。期望结果
正常工作
实际结果
An error thrown with a message like
taro.defineComponent
is not a function环境信息
The text was updated successfully, but these errors were encountered: