Skip to content

Comments

fix: update transformImport typing#6986

Merged
chenjiahan merged 1 commit intomainfrom
transform_import_type_0116
Jan 17, 2026
Merged

fix: update transformImport typing#6986
chenjiahan merged 1 commit intomainfrom
transform_import_type_0116

Conversation

@chenjiahan
Copy link
Member

Summary

Updated the TransformImport type to use stricter types for customName and customStyleName, and added new options ignoreEsComponent and ignoreStyleComponent

Related Links

Checklist

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

Copilot AI review requested due to automatic review settings January 16, 2026 14:13
@netlify
Copy link

netlify bot commented Jan 16, 2026

Deploy Preview for rsbuild-v2 ready!

Name Link
🔨 Latest commit fc9d23a
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild-v2/deploys/696a478d88be7b00086a1aab
😎 Deploy Preview https://deploy-preview-6986--rsbuild-v2.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.

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 updates the TransformImport type definition to use stricter typing for customName and customStyleName properties (changing from any to string), reorders these properties for better readability, and adds two new optional fields: ignoreEsComponent and ignoreStyleComponent (both of type string[]). The changes also include updating references from "webpack" to "Rspack" in various comments to reflect the project's current bundler focus.

Changes:

  • Updated TransformImport type to use stricter types (string instead of any) for customName and customStyleName
  • Added new optional properties ignoreEsComponent and ignoreStyleComponent to the TransformImport type
  • Updated comments to reference "Rspack" instead of "webpack" for accuracy

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/core/src/types/config.ts Updated TransformImport type definition with stricter types and new properties
website/docs/zh/config/source/transform-import.mdx Updated Chinese documentation to reflect type changes
website/docs/en/config/source/transform-import.mdx Updated English documentation to reflect type changes
scripts/test-helper/src/index.ts Updated comment to reference "Rspack" instead of "rspack/webpack"
packages/core/src/plugins/splitChunks.ts Updated comments to reference "Rspack" instead of "webpack"
packages/core/src/plugins/html.ts Removed unnecessary type annotation comment and simplified code

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

@chenjiahan chenjiahan merged commit d0b4b89 into main Jan 17, 2026
16 checks passed
@chenjiahan chenjiahan deleted the transform_import_type_0116 branch January 17, 2026 01:35
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