Skip to content

fix(css): ignore exportsOnly in local ident hashes - #15364

Open
mattcosta7 wants to merge 5 commits into
web-infra-dev:mainfrom
mattcosta7:fix/css-exports-only-local-ident-hash
Open

fix(css): ignore exportsOnly in local ident hashes#15364
mattcosta7 wants to merge 5 commits into
web-infra-dev:mainfrom
mattcosta7:fix/css-exports-only-local-ident-hash

Conversation

@mattcosta7

@mattcosta7 mattcosta7 commented Aug 27, 2026

Copy link
Copy Markdown

Summary

When building for SSR with CSS handling, the hashes end up differing because exportsOnly: true | false impacts the hash generation.

fixes #14786

  • exclude exportsOnly from CSS module local identifier hash inputs
  • keep exportsOnly in generator/runtime hashing where it affects emitted output
  • cover web (exportsOnly: false) and node (exportsOnly: true) builds with matching local-ident snapshots

Related links

N/A

Validation

  • cargo check -p rspack_plugin_css
  • cargo fmt --all -- --check
  • verified web/node local-ident snapshots are byte-for-byte identical in both runtime modes
  • full binding-backed config test could not run locally because the container repeatedly terminated rspack_core compilation with SIGTERM, including with one Cargo job and one rustc thread

Checklist

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

@mattcosta7
mattcosta7 marked this pull request as ready for review August 27, 2026 12:11
@LingyuCoder
LingyuCoder requested a review from intellild August 28, 2026 02:26
@codspeed-hq

codspeed-hq Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will degrade performance by 2.29%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

❌ 1 regressed benchmark
✅ 49 untouched benchmarks
⏩ 47 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation rust@create_named_module_ids 3.1 ms 3.2 ms -2.29%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing mattcosta7:fix/css-exports-only-local-ident-hash (f1baf23) with main (e8ecb52)2

Open in CodSpeed

Footnotes

  1. 47 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

  2. No successful run was found on main (a9eda5a) during the generation of this report, so e8ecb52 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@LingyuCoder

Copy link
Copy Markdown
Contributor

Thanks. Some test cases are failing due to the hash changes and need to be updated.

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.

[Bug]: CSS Modules local identifiers differ when exportsOnly changes

2 participants