Skip to content

Conversation

@Timeless0911
Copy link
Contributor

Summary

Enable buildCache by default in Rslib.

Related Links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings November 13, 2025 12:01
@netlify
Copy link

netlify bot commented Nov 13, 2025

Deploy Preview for rslib ready!

Name Link
🔨 Latest commit 9a3c06a
🔍 Latest deploy log https://app.netlify.com/projects/rslib/deploys/6915c87e66a2f00008c047cb
😎 Deploy Preview https://deploy-preview-1334--rslib.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot finished reviewing on behalf of Timeless0911 November 13, 2025 12:03
Copy link
Contributor

Copilot AI left a 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: true as 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.

Copy link
Member

@fi3ework fi3ework left a 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.

@Timeless0911 Timeless0911 marked this pull request as draft November 13, 2025 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants