feat: support shorter string value for output.distPath#6352
Conversation
✅ Deploy Preview for rsbuild ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for using a string value for output.distPath as a shorthand for output.distPath.root, making the configuration more intuitive when users only need to customize the root path.
Key changes:
- Updated type definitions to allow string values for
distPath - Added normalization logic to convert string values to object form
- Updated documentation with examples and version history
Reviewed Changes
Copilot reviewed 47 out of 47 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/core/src/types/config.ts | Updated type definition to allow string or object for distPath |
| packages/core/src/defaultConfig.ts | Added normalizeConfigStructure function to handle string distPath conversion |
| packages/core/src/provider/initConfigs.ts | Updated to use new normalization function |
| packages/core/src/createContext.ts | Simplified getAbsoluteDistPath function signature |
| website/docs/en/config/output/dist-path.mdx | Added documentation for string type support |
| website/docs/zh/config/output/dist-path.mdx | Added Chinese documentation for string type support |
| e2e/cases/assets/custom-dist-path-string/* | New test case for string distPath functionality |
| Various e2e test files | Updated test configurations to use new string syntax |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting

Summary
This PR adds support for using a string value for
output.distPathas a shorthand foroutput.distPath.root, since I noticed that in many cases, users only need to custom the root path — and using a string feels more intuitive in such scenarios.Checklist