feat: Add beforeModuleIds hook#13223
Merged
hardfist merged 4 commits intoweb-infra-dev:v1.xfrom Mar 6, 2026
Merged
Conversation
added 4 commits
March 5, 2026 12:35
Cherry-picked from 5ee65b4 with conflict resolution for v1.x
beforeModuleIds hook
Merging this PR will not alter performance
Comparing Footnotes
|
beforeModuleIds hookbeforeModuleIds hook
hardfist
approved these changes
Mar 6, 2026
Contributor
Author
|
@hardfist Would it be possible for another 1.7.x release (or 1.8) to be cut with this change included? |
Contributor
|
@hamlim 1.7.8 is released which includes this feature |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
This change backports the added
beforeModuleIdshook to the v1 release branch, specifically it backports both of these PRs:beforeModuleIdshook #12809 (already merged intomain)beforeModuleIdshook #13222 (not yet merged intomain)Which adds support for the
beforeModuleIdshook to rspack, allowing JS access to customize module ids within a build, specifically allowing for both strings and numbers as valid values for the module id.Related links
See above mentioned PRs.
Checklist