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

编译支付宝小程序产物中页面应该是 import base.axml 文件,而不是每个文件复制一份 base.axml #12019

Closed
moyafaxi opened this issue Jun 30, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@moyafaxi
Copy link
Contributor

这个特性解决了什么问题?

size 问题

这个 API 长什么样?

支付宝小程序产物中页面应该是 import base.axml 文件,现在打包后每个页面都是复制了一份 base.axml,导致 size 很大

看了一下代码,https://github.com/NervJS/taro/blob/next/packages/taro-alipay/src/index.ts#L26 在这里特地做了这个处理,这个处理的场景是什么。

我在自己的项目中试着把 modifyPageTemplate 方法调用注释了,项目运行也是正常的

@taro-bot2 taro-bot2 bot added enhancement New feature or request labels Jun 30, 2022
@moyafaxi
Copy link
Contributor Author

moyafaxi commented Jul 1, 2022

@Chen-jj 老哥 麻烦看下这段逻辑现在还需要么 https://github.com/NervJS/taro/blob/next/packages/taro-alipay/src/index.ts#L26

@Chen-jj
Copy link
Contributor

Chen-jj commented Jul 1, 2022

需要的

@moyafaxi
Copy link
Contributor Author

moyafaxi commented Jul 1, 2022

需要的

支付宝文档中找到了,现在编译完每个页面都会默认引用 custom-wrapper,所以会走进这段逻辑。

image

@Chen-jj
Copy link
Contributor

Chen-jj commented Sep 19, 2022

受支付宝小程序 template 限制,仍然没有很好的办法处理此问题。目前能想到的办法只有当用户没有使用到 CustomWrapper 的时候,页面不引用 custom-wrapper。但如果用户在项目中使用了 CustomWrapper,仍会为所有页面复制一份 base.wxml 模板。

#11745 处理。

@Chen-jj Chen-jj closed this as completed Sep 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants