Skip to content

fix(hmr): keep extracted CSS reload single-owned#14846

Draft
LingyuCoder wants to merge 1 commit into
seal/hmr-runtime-factories-14792from
seal/css-hmr-owner-14793
Draft

fix(hmr): keep extracted CSS reload single-owned#14846
LingyuCoder wants to merge 1 commit into
seal/hmr-runtime-factories-14792from
seal/css-hmr-owner-14793

Conversation

@LingyuCoder

@LingyuCoder LingyuCoder commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Let the native miniCss HMR handler own extracted stylesheet replacement when it is present.
  • Retain the loader reload fallback when the extracted runtime is disabled.
  • Cover repeated edits, request counts, single-link ownership, and the runtime-disabled fallback.

Related links

Source PR: #14772

Closes #14793

Checklist

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

Co-authored-by: Matthew Davis <276116661+matthewdavis-oai@users.noreply.github.com>
@LingyuCoder LingyuCoder changed the title fix(hmr): keep extracted css reload single-owned fix(hmr): keep extracted CSS reload single-owned Jul 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📦 Binary Size-limit

Comparing 77927e0 to fix(hmr): preserve disposed module factories by harpsealjs

⏳ The base commit triggered a linux binding build, but its binary size data has not been generated yet, so the size comparison is skipped.

Please re-run this workflow once the ecosystem-benchmark data for that commit is published.

Warning

Reference only — not the real baseline. The base commit's data isn't ready yet, so this compares against the nearest earlier commit that has data (25274d8) for a rough estimate:

❌ Size increased by 64.00KB from 66.59MB to 66.66MB (⬆️0.09%)

@github-actions

Copy link
Copy Markdown
Contributor

Rsdoctor Bundle Diff Analysis

Found 5 projects in monorepo, 5 projects with changes.

📊 Quick Summary
Project Total Size Gzip Size Change Gzip Change
react-10k 5.6 MB 1.3 MB - -
popular-libs 1.7 MB 552.1 KB - -
react-1k 823.1 KB 217.0 KB - -
react-5k 2.7 MB 663.8 KB - -
ui-components 4.9 MB 1.4 MB - -
📋 Detailed Reports (Click to expand)

📁 react-10k

Path: ../build-tools-performance/cases/react-10k/dist/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 5.6 MB - -
🗜️ Gzip Size 1.3 MB - -
📄 JavaScript 5.6 MB - -
🎨 CSS 21.0 B - -
🌐 HTML 328.0 B - -
📁 Other Assets 0 B - -

📁 popular-libs

Path: ../build-tools-performance/cases/popular-libs/dist/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 1.7 MB - -
🗜️ Gzip Size 552.1 KB - -
📄 JavaScript 1.7 MB - -
🎨 CSS 0 B - -
🌐 HTML 289.0 B - -
📁 Other Assets 0 B - -

📁 react-1k

Path: ../build-tools-performance/cases/react-1k/dist/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 823.1 KB - -
🗜️ Gzip Size 217.0 KB - -
📄 JavaScript 822.7 KB - -
🎨 CSS 0 B - -
🌐 HTML 328.0 B - -
📁 Other Assets 0 B - -

📁 react-5k

Path: ../build-tools-performance/cases/react-5k/dist/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 2.7 MB - -
🗜️ Gzip Size 663.8 KB - -
📄 JavaScript 2.7 MB - -
🎨 CSS 21.0 B - -
🌐 HTML 328.0 B - -
📁 Other Assets 0 B - -

📁 ui-components

Path: ../build-tools-performance/cases/ui-components/dist/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 4.9 MB - -
🗜️ Gzip Size 1.4 MB - -
📄 JavaScript 4.8 MB - -
🎨 CSS 112.1 KB - -
🌐 HTML 328.0 B - -
📁 Other Assets 0 B - -

Generated by Rsdoctor GitHub Action

@codspeed-hq

codspeed-hq Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 43 untouched benchmarks
⏩ 47 skipped benchmarks1


Comparing seal/css-hmr-owner-14793 (77927e0) with main (25274d8)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 seal/hmr-runtime-factories-14792 (8215103) during the generation of this report, so main (25274d8) was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

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]: extracted CSS HMR reloads each stylesheet twice and can retain a duplicate link

1 participant