fix(build): include remote miniapps in ecosystem.json during build #255
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
修复 CD 构建时
ecosystem.json没有包含 rwa-hub 等远程 miniapps 的问题。问题根因
generateEcosystemDataForBuild函数在 Build 模式下生成ecosystem.json时,只扫描了本地 miniapps(有vite.config.ts的目录),完全忽略了由vite-plugin-remote-miniapps下载的远程 miniapps。对比:
getRemoteMiniappsForEcosystem()合并远程 miniapps ✅scanMiniapps(),遗漏远程 miniapps ❌修复
添加
scanRemoteMiniappsForBuild()函数,检测并包含远程 miniapps(有manifest.json但没有vite.config.ts的目录)到最终的ecosystem.json输出。验证
构建后
dist/miniapps/ecosystem.json应包含: