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

taro convert 的过程中会有文件丢失 #4111

Closed
TadBO opened this issue Aug 8, 2019 · 7 comments
Closed

taro convert 的过程中会有文件丢失 #4111

TadBO opened this issue Aug 8, 2019 · 7 comments

Comments

@TadBO
Copy link

TadBO commented Aug 8, 2019

原生小程序转taro时会出现部分文件丢失情况
image

@taro-bot
Copy link

taro-bot bot commented Aug 8, 2019

欢迎提交 Issue~

如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏

如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。

Good luck and happy coding~

@Qiyu8
Copy link
Collaborator

Qiyu8 commented Aug 12, 2019

我在转换过程中也发现了这个问题,page下面只要不是按照微信小程序命名的文件都无法识别,转换之后需要自己一个个拷贝过去

@luckyadam
Copy link
Member

什么文件会丢失

@Issacpeng
Copy link
Collaborator

Issacpeng commented Sep 17, 2019

经过调试测试,TARO runtime在进行JS文件转换时,会递归扫描该JS引入的嵌套JS文件列表,比如require等方式,只有在引入列表中的JS文件才会进行转换,与命名规则无关。

如图所示:checkLogin.js util.js wxValidate.js都应该未被任何地方引入,建议可作为非问题关闭。

@compass-yan
Copy link

@Issacpeng 我丢失的都是页面文件,非常奇怪,有的会转换,有很多就不会被转换。

@TadBO TadBO closed this as completed Sep 26, 2019
@compass-yan
Copy link

@TadBO 这个问题解决了么

@rockcitystore
Copy link

我是丢失了utils/db.js,发现在引用的地方将const db = require('db.js')改为const db = require('./db.js')即可解决。

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

6 participants