Skip to content

feat: add EnableChunkLoadingPlugin.{setEnabled,checkEnabled}#9092

Merged
ahabhgk merged 7 commits intoweb-infra-dev:mainfrom
colinaaa:colin/0123/chunk-loading
Feb 6, 2025
Merged

feat: add EnableChunkLoadingPlugin.{setEnabled,checkEnabled}#9092
ahabhgk merged 7 commits intoweb-infra-dev:mainfrom
colinaaa:colin/0123/chunk-loading

Conversation

@colinaaa
Copy link
Copy Markdown
Collaborator

@colinaaa colinaaa commented Jan 22, 2025

Summary

Implement EnableChunkLoadingPlugin.setEnabled and EnableChunkLoadingPlugin.checkEnabled APIs.

These APIs are useful for making custom chunk loading.

Checklist

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

@netlify
Copy link
Copy Markdown

netlify Bot commented Jan 22, 2025

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Jan 22, 2025

CodSpeed Performance Report

Merging #9092 will not alter performance

Comparing colinaaa:colin/0123/chunk-loading (83221c5) with main (66c5e0d)

🎉 Hooray! codspeed-node just leveled up to 4.0.0!

A heads-up, this is a breaking change and it might affect your current performance baseline a bit. But here's the exciting part - it's packed with new, cool features and promises improved result stability 🥳!
Curious about what's new? Visit our releases page to delve into all the awesome details about this new version.

Summary

✅ 4 untouched benchmarks

@colinaaa colinaaa marked this pull request as ready for review January 23, 2025 04:39
@chenjiahan chenjiahan requested review from JSerFeng and SyMind and removed request for SyMind January 23, 2025 14:04
@chenjiahan chenjiahan requested review from ahabhgk and removed request for JSerFeng and SyMind February 6, 2025 02:25
@ahabhgk ahabhgk merged commit 8477ca6 into web-infra-dev:main Feb 6, 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