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

taro3.0.x addChunkPages问题 #8020

Open
PlutoCA opened this issue Nov 10, 2020 · 2 comments
Open

taro3.0.x addChunkPages问题 #8020

PlutoCA opened this issue Nov 10, 2020 · 2 comments
Assignees
Labels
F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x

Comments

@PlutoCA
Copy link

PlutoCA commented Nov 10, 2020

相关平台

微信小程序

小程序基础库: 2.13.2
使用框架: React

复现步骤

由于echart图表库太大,把该库放在子包中,并配置了webpack从common.js中分离,分离出的js文件放在子包中,并且只有子包中的页面使用了echart组件。但在真机中报错,找不到组件。
需手动改一下编译后的代码,在子组件里引用一下抽出来的公共文件
这个问题 #5645 taro2.0版本好像已经有了,现在3.0 还有啥解决方案不

期望结果

组件正常使用

实际结果

组件无法正常使用,需要在子组件里头再复制一次打包出来的文件

环境信息

Taro CLI 3.0.16 environment info:
System:
OS: macOS 10.14.4
Shell: 3.2.57 - /bin/bash
Binaries:

npmPackages:
    "@tarojs/cli": "^3.0.16",
    "@tarojs/components": "3.0.16",
    "@tarojs/react": "3.0.16",
    "@tarojs/runtime": "3.0.16",
    "@tarojs/taro": "3.0.16",
    "echarts12": "^1.1.6",

补充
#demo.zip

@taro-bot2 taro-bot2 bot added F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x labels Nov 10, 2020
@PlutoCA
Copy link
Author

PlutoCA commented Nov 10, 2020

还有一个问题就是 打包出来的文件,我没有在主包内引用,为啥开发工具这里怎么还是显示主包这么大
image
image
引用都是在分包文件内引用,按理应该不会算在主包体积里头才对。这是开发工具的bug吗?还是我少了什么设置吗

@zwzy
Copy link

zwzy commented Jan 4, 2021

什么时候能解决。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x
Projects
None yet
Development

No branches or pull requests

3 participants