Skip to content

Conversation

@chenjiahan
Copy link
Member

@chenjiahan chenjiahan commented Jul 5, 2025

Summary

Improve the SVGR options type to fix rspack-ecosystem-ci.

Related Links

Checklist

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

Copilot AI review requested due to automatic review settings July 5, 2025 02:41
@netlify
Copy link

netlify bot commented Jul 5, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit 9bd7375
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/6868911ad09aa00008e61feb
😎 Deploy Preview https://deploy-preview-5541--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: 87 (🟢 up 12 from production)
Accessibility: 97 (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

Improve the SVGR options type to ensure the svgoConfig property uses the correct SvgoConfig type and resolves type issues in the Rspack ecosystem CI.

  • Rename imported Config from @svgr/core to BaseSvgrOptions and define a new SvgrOptions alias
  • Override svgoConfig with the correct SvgoConfig and make it optional
  • Update the deepmerge call’s generic type to require both svgo and svgoConfig
Comments suppressed due to low confidence (2)

packages/plugin-svgr/src/index.ts:165

  • Consider adding unit tests for the SVGR plugin to verify that custom svgoConfig options are correctly merged and applied at runtime.
      >(

packages/plugin-svgr/src/index.ts:9

  • [nitpick] Please add a brief comment explaining why svgoConfig is omitted from BaseSvgrOptions and redefined, so future maintainers understand the override rationale.
type SvgrOptions = Omit<BaseSvgrOptions, 'svgoConfig'> & {

@chenjiahan chenjiahan merged commit 084eaf9 into main Jul 5, 2025
13 checks passed
@chenjiahan chenjiahan deleted the svgr_type_0705 branch July 5, 2025 03:03
@chenjiahan chenjiahan mentioned this pull request Jul 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants