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产物能作为微信小程序子包被引用吗? #5251

Closed
raymond-cat opened this issue Jan 6, 2020 · 4 comments
Closed

taro产物能作为微信小程序子包被引用吗? #5251

raymond-cat opened this issue Jan 6, 2020 · 4 comments
Assignees

Comments

@raymond-cat
Copy link

raymond-cat commented Jan 6, 2020

问题描述

taro微信产物作为子包被引入会报错

复现步骤

taro产物删除project.config.json和app.json并复制进主微信小程序子包目录,主小程序app.json添加

"subpackages": [
    {
      "root": "package1",
      "pages": [
        "pages/home/index"
      ]
    }
  ]

期望行为

taro项目产物能作为子包被引用

报错信息

image

系统信息

taro版本:1.3.30

@taro-bot
Copy link

taro-bot bot commented Jan 6, 2020

欢迎提交 Issue~

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

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

Good luck and happy coding~

@taro-bot
Copy link

taro-bot bot commented Jan 6, 2020

CC @luckyadam

@luckyadam
Copy link
Member

你在这个页面里也引入一下 @tarojs/async-await ,然后再编译出来给微信小程序子包用

@raymond-cat
Copy link
Author

你在这个页面里也引入一下 @tarojs/async-await ,然后再编译出来给微信小程序子包用

这样其他文件中都需要去引入@tarojs/async-await

在使用redux的情况下还会出现其他错误,因为taro app.js中会会涉及到一些模块的初始化
image

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