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

feat: add siblings and origins for chunk stats #893

Merged
merged 3 commits into from
Jan 29, 2024
Merged

Conversation

PeachScript
Copy link
Member

@PeachScript PeachScript commented Jan 24, 2024

增加 stats.json 的信息量,目的是支持 Umi 的子路由资源预加载功能,以及尽量兼容 webpack 的结构,主要改动:

  1. chunk 数据增加 siblings,即 chunk 直接依赖的 chunk 列表,命名同 webpack
  2. chunk 数据增加 origins,即 chunk 被引入的源 module 信息,命名同 webpack
  3. chunk 数据中的 chunk_id 重命名为 id,同 webpack
  4. module 数据中的 module_id 重命名为 id,同 webpack
  5. stats 的外围信息(比如 output_path)序列化时均转为驼峰命名,同 webpack

@goo-yyh 帮忙确认下 3、4、5 是否会造成 Breaking Change,目前 stats.json 应该没有下游消费方?

@sorrycc sorrycc merged commit 0961f16 into master Jan 29, 2024
8 checks passed
@delete-merged-branch delete-merged-branch bot deleted the feature/improve-stats branch January 29, 2024 03:19
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

Successfully merging this pull request may close these issues.

2 participants