Skip to content

docs(config): improve module.defaultRules documentation#12230

Merged
chenjiahan merged 2 commits intomainfrom
default_rules_docs_1118
Nov 18, 2025
Merged

docs(config): improve module.defaultRules documentation#12230
chenjiahan merged 2 commits intomainfrom
default_rules_docs_1118

Conversation

@chenjiahan
Copy link
Copy Markdown
Member

Summary

Clarify the purpose and usage of module.defaultRules in documentation. Add examples for extending and removing default rules, and update the type definition to include Falsy values.

Checklist

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

Copilot AI review requested due to automatic review settings November 18, 2025 07:53
@netlify
Copy link
Copy Markdown

netlify bot commented Nov 18, 2025

Deploy Preview for rspack ready!

Name Link
🔨 Latest commit e1e92a6
🔍 Latest deploy log https://app.netlify.com/projects/rspack/deploys/691c2606658e690008e8cebb
😎 Deploy Preview https://deploy-preview-12230--rspack.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 team The issue/pr is created by the member of Rspack. release: document release: document related release(mr only) labels Nov 18, 2025
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

This PR enhances the documentation for module.defaultRules configuration option by providing clearer explanations and practical examples for developers working with Rspack's module resolution rules.

Key changes:

  • Updated type definition from Rule[] to (Rule | Falsy)[] to accurately reflect accepted values
  • Added comprehensive explanation of what default rules are and their purpose
  • Included practical code examples demonstrating how to extend and remove default rules

Reviewed Changes

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

File Description
website/docs/en/config/module.mdx Enhanced English documentation with detailed explanation, usage examples, and updated source code reference (line #L453)
website/docs/zh/config/module.mdx Enhanced Chinese documentation with corresponding translations, matching code examples, and updated source code reference (line #L453)

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

@chenjiahan chenjiahan enabled auto-merge (squash) November 18, 2025 07:57
@chenjiahan chenjiahan merged commit b531d85 into main Nov 18, 2025
35 checks passed
@chenjiahan chenjiahan deleted the default_rules_docs_1118 branch November 18, 2025 08:03
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) team The issue/pr is created by the member of Rspack.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants