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

build-plugin-component1.x里耦合了miniapp相关的逻辑 #647

Open
BingruLin opened this issue Apr 28, 2024 · 0 comments
Open

build-plugin-component1.x里耦合了miniapp相关的逻辑 #647

BingruLin opened this issue Apr 28, 2024 · 0 comments

Comments

@BingruLin
Copy link

我对比了build-plugin-rax-component0.x和build-plugin-component1.x的内容,发现在target为miniapp的情况下,build-plugin-component1.x里会将预设的模板拷贝进当前用户的工程目录
image

这里显得不太合理,既然在miniapp情况下交付给miniapp-compile-config来负责webpack的配置和工程构建,那么为啥要在调度miniapp-compile-config的build-plugin-component层面中加入模板复制呢?导致与miniapp相关的构建不是单一职责了

另外模板中的内容也是写死的(src/template/miniapp/ali-miniapp),如果不同业务方需要定制不同内容的小程序模板,目前只能通过在build-scripts层通过加入plugin改写webpackChain配置来实现(有没有合适的改写时机都还不知道),这样显得挺复杂。。。

于是对于miniapp构建来讲,build-plugin-rax-component0.x的使用体验就明显比build-plugin-component1.x好不少。

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

1 participant