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

求教各位为什么我的微信小程序依赖包这么大?是我用的方法不对吗还是? #1959

Open
1 task
TobinXu opened this issue May 7, 2024 · 2 comments

Comments

@TobinXu
Copy link

TobinXu commented May 7, 2024

  • I have searched the issues of this repository and believe that this is not a duplicate.

What problem does this feature solve?

包体积太大了

What does the proposed API look like?

压缩包体积

image

@TobinXu
Copy link
Author

TobinXu commented May 7, 2024

image

@EthanLiBin
Copy link

哈喽,我目前的方案可以解决在小程序中问题。
1.讲f2和f-engine 分别打包出 min.js,在项目中引用
image

2.将 f-wx的内容拿出来放在wxcomponents下面,处理图表的canvas挂载
image
image

3.处理打包后提示主包过大的问题,在打包后的dist/wx中将chart组件手动从/wxcomponents/目录下修改到子包的目录下(处理usingComponents配置),chart组件也放到子包内。

上面的方案我试过了是可行的。

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

2 participants