Skip to content

feat: add inline value condition for reexport#11628

Merged
ahabhgk merged 3 commits intomainfrom
feat-inline-value-condition-for-reexport
Sep 10, 2025
Merged

feat: add inline value condition for reexport#11628
ahabhgk merged 3 commits intomainfrom
feat-inline-value-condition-for-reexport

Conversation

@ahabhgk
Copy link
Copy Markdown
Contributor

@ahabhgk ahabhgk commented Sep 10, 2025

Summary

add inline value condition for reexport

Related links

Checklist

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

Copilot AI review requested due to automatic review settings September 10, 2025 06:00
@github-actions github-actions bot added team The issue/pr is created by the member of Rspack. release: feature release: feature related release(mr only) labels Sep 10, 2025
@netlify
Copy link
Copy Markdown

netlify bot commented Sep 10, 2025

Deploy Preview for rspack canceled.

Name Link
🔨 Latest commit 8410953
🔍 Latest deploy log https://app.netlify.com/projects/rspack/deploys/68c115cd6496f90008aacb7a

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 CanInlineUse and can_inline_provide fields instead of the legacy Inlinable enum
  • 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.

@github-actions
Copy link
Copy Markdown
Contributor

📦 Binary Size-limit

Comparing 8410953 to chore(deps): update dependency emnapi to ^1.5.0 (#11626) by renovate[bot]

❌ Size increased by 5.25KB from 47.23MB to 47.23MB (⬆️0.01%)

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Sep 10, 2025

CodSpeed Performance Report

Merging #11628 will not alter performance

Comparing feat-inline-value-condition-for-reexport (8410953) with main (3f6229a)

Summary

✅ 17 untouched benchmarks

@ahabhgk ahabhgk enabled auto-merge (squash) September 10, 2025 07:08
@ahabhgk ahabhgk merged commit e0490fc into main Sep 10, 2025
68 of 70 checks passed
@ahabhgk ahabhgk deleted the feat-inline-value-condition-for-reexport branch September 10, 2025 07:57
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) team The issue/pr is created by the member of Rspack.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants