Skip to content

Conversation

@fi3ework
Copy link
Member

@fi3ework fi3ework commented Nov 5, 2025

Summary

remove externalsPresets.node, in Rslib, we already using a hand made module builtin modules list. so it's duplicsated.

in the other hand, externals: { fs: false } can't bail out externalize if externalsPresets exist as it's implemented by another ExternalPlugin.

Related Links

Checklist

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

Copilot AI review requested due to automatic review settings November 5, 2025 11:46
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 adds externalsPresets: { node: false } configuration to the Rspack configuration when targeting Node.js environments. This prevents Rspack from automatically treating Node.js built-in modules as externals, allowing explicit control through the nodeBuiltInModules array defined in the externalsConfig.

  • Added externalsPresets.node: false to Node target configuration in composeTargetConfig function
  • Updated test snapshots to reflect the new configuration

Reviewed Changes

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

File Description
packages/core/src/config.ts Added externalsPresets: { node: false } to the rspack configuration for Node.js target
packages/core/tests/snapshots/config.test.ts.snap Updated test snapshots to include the new externalsPresets configuration in all Node.js target scenarios

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

@fi3ework fi3ework requested a review from Timeless0911 November 5, 2025 11:55
@Timeless0911 Timeless0911 merged commit 75d01f1 into main Nov 5, 2025
23 checks passed
@Timeless0911 Timeless0911 deleted the exth branch November 5, 2025 12:19
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.

3 participants