Skip to content

docs(plugin): update apply property for its function signature#5654

Merged
chenjiahan merged 1 commit intomainfrom
apply_fn_0723
Jul 23, 2025
Merged

docs(plugin): update apply property for its function signature#5654
chenjiahan merged 1 commit intomainfrom
apply_fn_0723

Conversation

@chenjiahan
Copy link
Copy Markdown
Member

Summary

Update the documentation of apply property for its function signature.

Related Links

Checklist

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

Copilot AI review requested due to automatic review settings July 23, 2025 08:05
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 updates the documentation for the apply property in Rsbuild plugins to include its function signature option. The documentation now properly explains that apply can be either a string value ('serve' | 'build') or a function that receives configuration and context parameters.

  • Updates the type definition to include Function as an option for the apply property
  • Adds comprehensive documentation explaining the function signature with TypeScript types
  • Provides practical examples showing how to use the function form of apply
  • Improves existing property descriptions with cross-references to detailed sections

Reviewed Changes

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

File Description
website/docs/zh/plugins/dev/core.mdx Updates Chinese documentation with function signature details and examples for the apply property
website/docs/en/plugins/dev/core.mdx Updates English documentation with function signature details and examples for the apply property
packages/core/src/types/plugin.ts Improves JSDoc comment for better consistency with documentation

@netlify
Copy link
Copy Markdown

netlify Bot commented Jul 23, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit d3ce50c
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/688097dfaa6a2b000893fe2f
😎 Deploy Preview https://deploy-preview-5654--rsbuild.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 74 (🟢 up 18 from production)
Accessibility: 97 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: 60 (no change from production)
View the detailed breakdown and full score reports

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

@chenjiahan chenjiahan merged commit fe0ca0e into main Jul 23, 2025
12 checks passed
@chenjiahan chenjiahan deleted the apply_fn_0723 branch July 23, 2025 08:11
@chenjiahan chenjiahan mentioned this pull request Jul 24, 2025
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