feat: add inline value condition for reexport#11628
Merged
Conversation
✅ Deploy Preview for rspack canceled.
|
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds inline value condition support for re-export dependencies in the Rspack bundler. The key changes enable better optimization for re-exported constants by allowing them to be inlined when possible.
- Refactors the inline constant optimization system to use
CanInlineUseandcan_inline_providefields instead of the legacyInlinableenum - Extends inline value dependency conditions to work with ESM export-import specifier dependencies
- Adds comprehensive test coverage for re-export barrel side effects scenarios
Reviewed Changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
tests/rspack-test/configCases/inline-const/basic/*.js |
Test files for barrel side effects scenarios |
crates/rspack_plugin_library/src/*.rs |
Updated library plugins to use new CanInlineUse::No |
crates/rspack_plugin_javascript/src/plugin/*.rs |
Migration from Inlinable to CanInlineUse in usage plugins |
crates/rspack_plugin_javascript/src/dependency/*.rs |
Enhanced re-export dependency handling with inline conditions |
crates/rspack_core/src/exports/*.rs |
Core refactoring from Inlinable enum to separate provide/use fields |
crates/rspack_core/src/concatenated_module.rs |
Updated to handle new inline value structures |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
crates/rspack_plugin_javascript/src/dependency/esm/esm_import_specifier_dependency.rs
Show resolved
Hide resolved
Contributor
📦 Binary Size-limit
❌ Size increased by 5.25KB from 47.23MB to 47.23MB (⬆️0.01%) |
CodSpeed Performance ReportMerging #11628 will not alter performanceComparing Summary
|
SyMind
approved these changes
Sep 10, 2025
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
add inline value condition for reexport
Related links
Checklist