Skip to content

Comments

refactor: simplify build dependencies merging#6593

Merged
chenjiahan merged 2 commits intomainfrom
refactor_build_deps_1116
Nov 17, 2025
Merged

refactor: simplify build dependencies merging#6593
chenjiahan merged 2 commits intomainfrom
refactor_build_deps_1116

Conversation

@chenjiahan
Copy link
Member

Summary

Updates the build dependency handling logic in the caching plugin, simplifying how additional build dependencies are passed and stored.

Checklist

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

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

netlify bot commented Nov 16, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit 5649c38
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/6919d43ad1b8e500085eedef
😎 Deploy Preview https://deploy-preview-6593--rsbuild.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 69 (🔴 down 1 from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: 60 (no change from production)
View the detailed breakdown and full score reports

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

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 refactors the build dependencies merging logic in the caching plugin, changing from a flexible multi-group approach to a simpler single-array approach. The refactoring reduces complexity but also changes the API surface.

Key Changes:

  • Changed getBuildDependencies parameter from userBuildDependencies: Record<string, string[]> to additionalDependencies?: string[]
  • Replaced object spreading with direct property assignment (buildDependencies.additional = additionalDependencies)
  • Simplified the call site by passing cacheConfig.buildDependencies directly instead of wrapping it in an object

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@chenjiahan chenjiahan merged commit 437dfb6 into main Nov 17, 2025
18 checks passed
@chenjiahan chenjiahan deleted the refactor_build_deps_1116 branch November 17, 2025 06:30
@chenjiahan chenjiahan mentioned this pull request Nov 18, 2025
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.

1 participant