fix: handle missing loader paths - #84
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
🟢 Approval recommended
The change is small, well-scoped, and prevents a clear misconfiguration case (undefined loader path) without altering behavior when a loader is correctly configured.
Pull request overview
This PR updates the MDX plugin’s bundler-chain integration to avoid configuring the MDX rule with an undefined SWC/Babel loader path, improving compatibility with stricter Rsbuild/rspack-chain typings while preserving existing behavior when a loader is present.
Changes:
- Guard SWC/Babel
use.get('loader')before applying the loader to the MDX rule. - Only copy SWC/Babel loader + options into the MDX rule when a valid loader path is available.
File summaries
| File | Description |
|---|---|
| src/index.ts | Adds a loader-path guard when copying SWC/Babel loader configuration into the MDX rule. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Summary
Validation
Related: web-infra-dev/rsbuild#8437