Skip to content

Conversation

@LingyuCoder
Copy link
Contributor

Summary

This PR adds missing documentation for several properties that were previously marked with comments. The following options now have complete documentation in both English and Chinese:

  • requireAlias - Control whether renaming of the CommonJS require function will be parsed and transformed
  • requireAsExpression - Control whether require used as an expression will be parsed
  • requireDynamic - Control whether dynamic require calls will be parsed
  • requireResolve - Control whether require.resolve() calls will be parsed
  • importDynamic - Control whether dynamic import() calls will be parsed

Additionally, this PR:

  • Updates JSDoc comments in the type definitions to accurately reflect default values
  • Adds comprehensive documentation with examples for each option
  • Ensures consistency between English and Chinese documentation

Checklist

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

@LingyuCoder LingyuCoder requested a review from hardfist as a code owner January 15, 2026 08:36
@netlify
Copy link

netlify bot commented Jan 15, 2026

Deploy Preview for rspack-v2 ready!

Name Link
🔨 Latest commit 8cd4161
🔍 Latest deploy log https://app.netlify.com/projects/rspack-v2/deploys/6968a7d94f1d4d000814a23b
😎 Deploy Preview https://deploy-preview-12748--rspack-v2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions bot added the release: document release: document related release(mr only) label Jan 15, 2026
feat: remove deprecated cssHeadDataCompression option
@LingyuCoder LingyuCoder force-pushed the docs/add-javascript-parser-options-docs branch from 564cedb to 8cd4161 Compare January 15, 2026 08:39
@github-actions
Copy link
Contributor

Rsdoctor Bundle Diff Analysis

Found 5 projects in monorepo, 3 projects with changes.

📊 Quick Summary
Project Total Size Change
react-10k 5.7 MB -8.0 B (-0.0%)
react-1k 825.4 KB 0
react-5k 2.7 MB +1.0 B (0.0%)
ui-components 2.1 MB 0
rome 986.0 KB +1.7 KB (0.2%)
📋 Detailed Reports (Click to expand)

📁 react-10k

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

📌 Baseline Commit: 0eb2ee3d8b | PR: #12742

Metric Current Baseline Change
📊 Total Size 5.7 MB 5.7 MB -8.0 B (-0.0%)
📄 JavaScript 5.7 MB 5.7 MB -8.0 B (-0.0%)
🎨 CSS 21.0 B 21.0 B 0
🌐 HTML 0 B 0 B 0
📁 Other Assets 0 B 0 B 0

📦 Download Diff Report: react-10k Bundle Diff

📁 react-5k

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

📌 Baseline Commit: 0eb2ee3d8b | PR: #12742

Metric Current Baseline Change
📊 Total Size 2.7 MB 2.7 MB +1.0 B (0.0%)
📄 JavaScript 2.7 MB 2.7 MB +1.0 B (0.0%)
🎨 CSS 21.0 B 21.0 B 0
🌐 HTML 0 B 0 B 0
📁 Other Assets 0 B 0 B 0

📦 Download Diff Report: react-5k Bundle Diff

📁 rome

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

📌 Baseline Commit: 0eb2ee3d8b | PR: #12742

Metric Current Baseline Change
📊 Total Size 986.0 KB 984.3 KB +1.7 KB (0.2%)
📄 JavaScript 986.0 KB 984.3 KB +1.7 KB (0.2%)
🎨 CSS 0 B 0 B 0
🌐 HTML 0 B 0 B 0
📁 Other Assets 0 B 0 B 0

📦 Download Diff Report: rome Bundle Diff

Generated by Rsdoctor GitHub Action

@github-actions
Copy link
Contributor

📦 Binary Size-limit

Comparing 8cd4161 to refactor: move logger into pass and reorg some passes (#12742) by hardfist

🎉 Size decreased by 471.25KB from 48.03MB to 47.57MB (⬇️0.96%)

@codspeed-hq
Copy link

codspeed-hq bot commented Jan 15, 2026

CodSpeed Performance Report

Merging this PR will not alter performance

Comparing docs/add-javascript-parser-options-docs (8cd4161) with v2 (a0a802b)

Summary

✅ 16 untouched benchmarks
⏩ 1 skipped benchmark1

Footnotes

  1. 1 benchmark was skipped, so the baseline result was used instead. If it was deleted from the codebase, click here and archive it to remove it from the performance reports.

@chenjiahan chenjiahan merged commit e3da4f8 into v2 Jan 16, 2026
53 checks passed
@chenjiahan chenjiahan deleted the docs/add-javascript-parser-options-docs branch January 16, 2026 03:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release: document release: document related release(mr only)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants