fix: handle missing loader paths - #15
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, localized, and defensively handles missing loader paths without altering the existing options-cloning behavior.
Pull request overview
This PR improves the Stylus plugin’s bundler-chain integration by guarding against missing CSS loader paths when cloning Rsbuild’s built-in CSS loader chain into Stylus rules, maintaining compatibility with stricter rspack-chain getter typings.
Changes:
- Skip copying a CSS
useentry when itsloaderpath is missing (avoids configuring an invalid loader). - Preserve existing loader options by continuing to deep-clone and re-apply the copied loader options.
- Use the cached
loaderPathwhen configuring the cloned loader entry.
File summaries
| File | Description |
|---|---|
| src/index.ts | Adds a guard for missing loader paths and uses the cached path when cloning CSS loader uses into Stylus rules. |
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