Skip to content

feat: add chunkGraph.getNumberOfEntryModules#9035

Merged
SyMind merged 3 commits intoweb-infra-dev:mainfrom
colinaaa:colin/0117/entry-module-number
Jan 21, 2025
Merged

feat: add chunkGraph.getNumberOfEntryModules#9035
SyMind merged 3 commits intoweb-infra-dev:mainfrom
colinaaa:colin/0117/entry-module-number

Conversation

@colinaaa
Copy link
Copy Markdown
Collaborator

Summary

Implement the chunkGraph.getNumberOfEntryModules API of Webpack.

See: https://github.com/webpack/webpack/blob/3919c844eca394d73ca930e4fc5506fb86e2b094/lib/ChunkGraph.js#L1187

This allows getting the number of entry modules without iterating over it(which has better performance).

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@netlify
Copy link
Copy Markdown

netlify Bot commented Jan 17, 2025

@LingyuCoder LingyuCoder requested a review from SyMind January 17, 2025 09:40
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Jan 17, 2025

CodSpeed Performance Report

Merging #9035 will not alter performance

Comparing colinaaa:colin/0117/entry-module-number (672258e) with main (ad79086)

Summary

✅ 3 untouched benchmarks

@colinaaa colinaaa marked this pull request as ready for review January 17, 2025 09:59
@SyMind SyMind enabled auto-merge (squash) January 21, 2025 09:40
@SyMind SyMind merged commit d09a22a into web-infra-dev:main Jan 21, 2025
github-merge-queue Bot pushed a commit to lynx-family/lynx-stack that referenced this pull request Apr 2, 2025
<!--
  Thank you for submitting a pull request!

We appreciate the time and effort you have invested in making these
changes. Please ensure that you provide enough information to allow
others to review your pull request.

Upon submission, your pull request will be automatically assigned with
reviewers.

If you want to learn more about contributing to this project, please
visit:
https://github.com/lynx-family/lynx-stack/blob/main/CONTRIBUTING.md.
-->

## Summary

<!-- Can you explain the reasoning behind implementing this change? What
problem or issue does this pull request resolve? -->

This patch deletes the `ChunkLoadingRspackPlugin` and use
`ChunkLoadingWebpackPlugin` directly in Rspack.

We are doing it now since we have implemented all the APIs needed.

- web-infra-dev/rspack#9035
- web-infra-dev/rspack#9092
- web-infra-dev/rspack#9093

> [!CAUTION]
> This is a **BREAKING CHANGE** since you need to use `chunkLoading:
'lynx'` instead of `chunkLoading: 'require'`.

fix: #253 since we do not relay on `hooks.runtimeModule` which could
cause issue.

<!-- It would be helpful if you could provide any relevant context, such
as GitHub issues or related discussions. -->

## Checklist

<!--- Check and mark with an "x" -->

- [ ] Tests updated (or not required).
- [ ] Documentation updated (or not required).
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