Skip to content

chore: no need to set exportsPresence error#7173

Merged
chenjiahan merged 1 commit intomainfrom
exportsPresence_error_0211
Feb 11, 2026
Merged

chore: no need to set exportsPresence error#7173
chenjiahan merged 1 commit intomainfrom
exportsPresence_error_0211

Conversation

@chenjiahan
Copy link
Member

Summary

No need to set exportsPresence: 'error' as this has been set by default in Rspack 2.0.

Related Links

Checklist

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

Copilot AI review requested due to automatic review settings February 11, 2026 05:22
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @chenjiahan, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request streamlines the project's configuration by eliminating a redundant setting for exportsPresence: 'error'. This change aligns the codebase with the updated default behavior of Rspack 2.0, ensuring that the configuration remains clean and efficient without altering the intended functionality.

Highlights

  • Configuration Simplification: Removed the explicit setting of exportsPresence: 'error' in the JavaScript parser configuration, as this is now the default behavior in Rspack 2.0.
  • Snapshot Updates: Updated various snapshot test files across core and plugin packages to reflect the removal of the redundant exportsPresence configuration.
Changelog
  • packages/core/src/plugins/basic.ts
    • Removed the explicit exportsPresence: 'error' setting from the JavaScript parser configuration within the basic plugin.
  • packages/core/tests/snapshots/basic.test.ts.snap
    • Updated the snapshot to reflect the removal of the exportsPresence: 'error' configuration.
  • packages/core/tests/snapshots/builder.test.ts.snap
    • Updated the snapshot to reflect the removal of the exportsPresence: 'error' configuration.
  • packages/core/tests/snapshots/default.test.ts.snap
    • Updated multiple snapshots to reflect the removal of the exportsPresence: 'error' configuration.
  • packages/core/tests/snapshots/environments.test.ts.snap
    • Updated multiple snapshots to reflect the removal of the exportsPresence: 'error' configuration.
  • packages/plugin-react/tests/snapshots/index.test.ts.snap
    • Updated the snapshot to reflect the removal of the exportsPresence: 'error' configuration.
Activity
  • No human activity (comments, reviews) has been recorded on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request removes the explicit exportsPresence: 'error' configuration. As this is now the default behavior in Rspack 2.0, this change is a good cleanup of redundant code. The changes are correctly implemented, and the corresponding test snapshots have been updated accordingly. The changes look good.

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

Removes an explicit exportsPresence: 'error' parser setting from Rsbuild’s default Rspack chain configuration, since Rspack 2.0 sets this behavior by default (per linked upstream change). This keeps Rsbuild’s generated Rspack config aligned with upstream defaults and reduces redundant configuration.

Changes:

  • Remove exportsPresence: 'error' from the default parser configuration in the core “basic” plugin.
  • Update affected Jest snapshots in @rsbuild/core and plugin-react to reflect the new default config output.

Reviewed changes

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

Show a summary per file
File Description
packages/core/src/plugins/basic.ts Drops redundant exportsPresence parser option from the default Rspack chain config.
packages/core/tests/snapshots/basic.test.ts.snap Updates snapshots for basic plugin config output (dev/prod).
packages/core/tests/snapshots/builder.test.ts.snap Updates snapshot for default bundler (Rspack) config output.
packages/core/tests/snapshots/default.test.ts.snap Updates multiple default-config snapshots to remove exportsPresence.
packages/core/tests/snapshots/environments.test.ts.snap Updates environment-config snapshots where parser defaults are asserted.
packages/plugin-react/tests/snapshots/index.test.ts.snap Updates React plugin snapshot impacted by default parser config output.

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

@chenjiahan chenjiahan merged commit 619d78c into main Feb 11, 2026
12 checks passed
@chenjiahan chenjiahan deleted the exportsPresence_error_0211 branch February 11, 2026 05:27
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.

1 participant