Skip to content

docs(source-map): improve extraction option#7346

Merged
chenjiahan merged 2 commits intomainfrom
extract_doc_0319
Mar 19, 2026
Merged

docs(source-map): improve extraction option#7346
chenjiahan merged 2 commits intomainfrom
extract_doc_0319

Conversation

@chenjiahan
Copy link
Copy Markdown
Member

Summary

Improves the documentation and type definitions for the sourceMap.extract configuration option.

Checklist

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

Copilot AI review requested due to automatic review settings March 19, 2026 09:16
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on enhancing the clarity and completeness of the sourceMap.extract configuration option. It refines the associated TypeScript type definitions with more descriptive JSDoc comments and significantly updates both English and Chinese documentation to provide better context, usage examples, and integration details, ultimately improving the developer experience when configuring source map extraction.

Highlights

  • Type Definition Refinement: Improved JSDoc comments for SourceMapExtractTarget and SourceMapExtract types, providing clearer explanations for include, exclude, and the js property within the source map configuration.
  • Documentation Enhancement (English): Updated the English documentation for sourceMap.extract to include a tip about its Rspack implementation, clarify usage for all JavaScript files, and highlight performance benefits of include/exclude.
  • Documentation Enhancement (Chinese): Provided corresponding updates and clarifications in the Chinese documentation for sourceMap.extract, ensuring consistency across languages.
  • Version History Addition: Added a version history entry to both English and Chinese documentation for the sourceMap.extract option, noting its introduction in v2.0.0.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Mar 19, 2026

Deploying rsbuild with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3fb1119
Status: ✅  Deploy successful!
Preview URL: https://1f4b009a.rsbuild-v2.pages.dev
Branch Preview URL: https://extract-doc-0319.rsbuild-v2.pages.dev

View logs

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request improves the documentation for the sourceMap.extract configuration option across TypeScript type definitions and markdown documentation files in both English and Chinese. The changes enhance clarity by providing more detailed explanations, usage examples, and context about the feature's implementation. My feedback includes a suggestion to add a link to the Rspack documentation in the JSDoc comment for consistency and better developer experience.

Comment thread packages/core/src/types/config.ts
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

Updates the docs and config type comments to better explain the output.sourceMap.extract option, including when it’s useful and how it maps to Rspack’s underlying capability.

Changes:

  • Clarify that sourceMap.extract targets extracting existing source maps (e.g., from third-party packages shipping .js + .js.map).
  • Add a tip noting it’s backed by Rspack module.rules[].extractSourceMap and can replace source-map-loader.
  • Add a small version history entry for the option in both EN/ZH docs, and expand related TypeScript doc comments.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
website/docs/zh/config/output/source-map.mdx Improves Chinese docs for sourceMap.extract, adds tip + version history, and clarifies include/exclude performance note.
website/docs/en/config/output/source-map.mdx Mirrors the same documentation improvements in English.
packages/core/src/types/config.ts Refines TSDoc for SourceMapExtract* types to match the updated docs and clarify behavior/scope.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@chenjiahan chenjiahan merged commit 7b2e61d into main Mar 19, 2026
10 of 11 checks passed
@chenjiahan chenjiahan deleted the extract_doc_0319 branch March 19, 2026 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants