Skip to content

fix: default html script loading to module for module output#14544

Draft
intellild wants to merge 1 commit into
mainfrom
codex/html-plugin-module-script-loading
Draft

fix: default html script loading to module for module output#14544
intellild wants to merge 1 commit into
mainfrom
codex/html-plugin-module-script-loading

Conversation

@intellild

Copy link
Copy Markdown
Contributor

Summary

  • Default HtmlRspackPlugin scriptLoading to module when output.module is enabled.
  • Keep the existing defer default for non-module output and preserve explicit scriptLoading values.
  • Add coverage for the generated module script tag and update the English/Chinese plugin docs.

Testing

  • pnpm run build:js
  • env RUSTC_WRAPPER= pnpm run build:binding:dev
  • pnpm run test -t "builtins/html-inject"

by OpenAI Codex

@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

📦 Binary Size-limit

Comparing 7de3c17 to chore: bump swc_core from 68 to 71 (#14526) by CPunisher

🙈 Size remains the same at 67.71MB

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 23, 2026

Copy link
Copy Markdown

Deploying rspack with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7de3c17
Status: ✅  Deploy successful!
Preview URL: https://e86388aa.rspack-v2.pages.dev
Branch Preview URL: https://codex-html-plugin-module-scr.rspack-v2.pages.dev

View logs

@codspeed-hq

codspeed-hq Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 41 untouched benchmarks
⏩ 47 skipped benchmarks1


Comparing codex/html-plugin-module-script-loading (7de3c17) with main (f465cb6)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 (c8a5b42) during the generation of this report, so f465cb6 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@intellild intellild force-pushed the codex/html-plugin-module-script-loading branch from ed1926c to 7de3c17 Compare June 23, 2026 05:40
@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
popular-libs 1.7 MB 551.5 KB - -
react-10k 5.6 MB 1.3 MB - -
react-1k 822.8 KB 218.3 KB - -
ui-components 4.9 MB 1.4 MB - -
react-5k 2.7 MB 669.1 KB - -
📋 Detailed Reports (Click to expand)

📁 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 551.5 KB - -
📄 JavaScript 1.7 MB - -
🎨 CSS 0 B - -
🌐 HTML 289.0 B - -
📁 Other Assets 0 B - -

📁 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 - -

📁 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 822.8 KB - -
🗜️ Gzip Size 218.3 KB - -
📄 JavaScript 822.4 KB - -
🎨 CSS 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 111.9 KB - -
🌐 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 669.1 KB - -
📄 JavaScript 2.7 MB - -
🎨 CSS 21.0 B - -
🌐 HTML 328.0 B - -
📁 Other Assets 0 B - -

Generated by Rsdoctor GitHub Action

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.

1 participant