Skip to content

feat: compilation.addEntry support#10268

Merged
SyMind merged 2 commits intoweb-infra-dev:mainfrom
henryqdineen:hqd-compilation-add-entry
May 9, 2025
Merged

feat: compilation.addEntry support#10268
SyMind merged 2 commits intoweb-infra-dev:mainfrom
henryqdineen:hqd-compilation-add-entry

Conversation

@henryqdineen
Copy link
Contributor

Summary

In our webpack-based internal framework we use compilation.addEntry() to conditionally add entry points based on configuration and some file system conventions. I am aware that dynamic entrypoints exist but we have found that compilation.addEntry() to be more powerful and allow better encapsulation using plugins. I saw that compilation.addInclude() was implemented and it seemed like addEntry() could also be.

This PR adds support for the compilation.addEntry() entry and is mostly based off of the existing addInclude() implementation. They could probably share more code but I'm not sure if that is wanted.

Thanks!

Checklist

  • Tests updated (or not required). - added configCases/compilation/add-entry test
  • Documentation updated (or not required). - ran API extractor

@netlify
Copy link

netlify bot commented May 4, 2025

Deploy Preview for rspack canceled.

Built without sensitive environment variables

Name Link
🔨 Latest commit 8d07986
🔍 Latest deploy log https://app.netlify.com/sites/rspack/deploys/681d941e45595d0008e4fbb3

@henryqdineen henryqdineen changed the title compilation.addEntry support feat: compilation.addEntry support May 4, 2025
@github-actions github-actions bot added the release: feature release: feature related release(mr only) label May 4, 2025
@henryqdineen henryqdineen force-pushed the hqd-compilation-add-entry branch from 3536fde to 977fcc2 Compare May 4, 2025 03:56
@codspeed-hq
Copy link

codspeed-hq bot commented May 4, 2025

CodSpeed Performance Report

Merging #10268 will not alter performance

Comparing henryqdineen:hqd-compilation-add-entry (8d07986) with main (128a46e)

🎉 Hooray! codspeed-rust just leveled up to 2.7.2!

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

✅ 11 untouched benchmarks

@chenjiahan chenjiahan requested a review from ahabhgk May 6, 2025 02:32
@ahabhgk ahabhgk requested a review from SyMind May 6, 2025 03:30
@SyMind SyMind merged commit 4b88bb1 into web-infra-dev:main May 9, 2025
35 checks passed
@watsonhaw5566
Copy link

@henryqdineen 你好,我想问一下 其实这里的 compilation.addEntry 算不算 ompilation.addInclude 的别名?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release: feature release: feature related release(mr only)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants