-
-
Notifications
You must be signed in to change notification settings - Fork 55
feat: enable buildCache by default #1334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for rslib ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this 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 enables buildCache by default in Rslib to improve build performance by leveraging Rspack's persistent caching capabilities.
Key Changes:
- Set
buildCache: trueas the default in Rslib's core configuration - Disable build cache in test environments to ensure consistent test results
- Update test snapshots to reflect the new cache configuration
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/core/src/config.ts | Adds buildCache: true to the default performance configuration |
| tests/scripts/shared.ts | Explicitly disables buildCache in test environments with proper config spreading |
| packages/core/tests/snapshots/config.test.ts.snap | Updates snapshots to reflect cache configuration in experiments and performance settings |
| website/rspress.config.ts | Fixes builderConfig alias placement from resolve to source (unrelated bug fix) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to add document in Rslib website alongside? i'm afraid user is not likely to know cache config in Rsbuild/Rspack.
Summary
Enable
buildCacheby default in Rslib.Related Links
Checklist