feat(core): export config definition types - #8036
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors the core config-loading types by renaming the union type used for config “definitions” and exposing the relevant config definition types from the @rsbuild/core public entry point, improving clarity for both config-file exports and defineConfig(...) inputs.
Changes:
- Rename the config definition union type from
RsbuildConfigExporttoRsbuildConfigDefinition. - Update
defineConfigoverloads and config loader typing to useRsbuildConfigDefinition. - Re-export
RsbuildConfigDefinition,RsbuildConfigSyncFn, andRsbuildConfigAsyncFnfrom@rsbuild/core.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/core/src/loadConfig.ts | Renames the config definition union type and updates all local usages (defineConfig + loader typing). |
| packages/core/src/index.ts | Re-exports the config definition-related types from the package entry point. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis change renames the exported type Changes
Related PRs: None identified. Suggested labels: type, refactor Suggested reviewers: None identified. Poem 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
This PR renames the config definition union type from
RsbuildConfigExporttoRsbuildConfigDefinitionso the type better describes both config-file exports and values passed todefineConfig. It also exportsRsbuildConfigDefinition,RsbuildConfigSyncFn, andRsbuildConfigAsyncFnfrom the@rsbuild/coreentry point.