ttk-cli / uni-vue3-vite-ts-pinia

A template for uniapp with vue3.
MIT License
331 stars 100 forks source link

无法打包APP,不管是传统打包还是安心打包 #48

Closed emako closed 8 months ago

emako commented 8 months ago

image

HX的版本与仓库里依赖的一致

一直卡在40%,后台显示编译成功,就一直卡主这里了。 不知道大家有没有试过打包APP?

image

warmthsea commented 8 months ago

是的,同样的问题,无法打包成 apk

image

warmthsea commented 8 months ago

https://github.com/ttk-cli/uni-vue3-vite-ts-pinia/blob/main/vite.config.ts https://github.com/Allen-1998/pinia-auto-refs/blob/main/src/index.ts

pinia-auto-refs 插件库引起的,应该是APK编译过程中 fs 读文件死锁了,不兼容 Android 删除掉 vite.config.ts 的 pinia-auto-refs 就能正常编译打包 Android

@emako @Allen-1998

Allen-1998 commented 8 months ago

疑似是由于在 pinia-auto-refs@0.0.5 版本中为了解决在 uniapp 开发中的 hmr 问题,将监听文件的更新实现由 handleHotUpdate 替换为了 chokidar,然后在 uniapp 打包时 chokidar 未被释放导致的, 会在 pinia-auto-refs 的新版本中修复,计划修复方案: 区分开发模式和打包模式,仅开发模式启用 chokidar 监听文件变更

https://github.com/Allen-1998/pinia-auto-refs/issues/6

Allen-1998 commented 8 months ago

已修复,升级pinia-auto-refs@0.0.10即可

warmthsea commented 8 months ago

已修复,升级pinia-auto-refs@0.0.10即可

👍🏻