Skip to content

docs: describe output.autoExternal for Node server builds - #128

Closed
ScriptedAlchemy wants to merge 1 commit into
mainfrom
docs/auto-external
Closed

docs: describe output.autoExternal for Node server builds#128
ScriptedAlchemy wants to merge 1 commit into
mainfrom
docs/auto-external

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Collaborator

Summary

Documents Rsbuild's built-in output.autoExternal (2.0.7+) as the way to keep dependencies out of the server bundle on Node hosts. Verified on the default template: server output 463 KB → 10 KB, react-router, react-dom/server, @react-router/node, isbot and friends left external, react-router-serve serves the app unchanged. This matches React Router's Vite SSR default and avoids bundling generated packages like Prisma. Kept opt-in because the Cloudflare example and other single-file targets rely on bundling.

Docs only; no changeset.

🤖 Generated with Claude Code

Rsbuild 2.0.7 added output.autoExternal for node environments. With it
enabled the default template's server output shrinks from 463 KB to 10 KB,
dependencies stay in node_modules, and the built server runs unchanged,
which matches React Router's Vite SSR default. Kept opt-in because
single-file targets such as Cloudflare Workers rely on bundling.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@pkg-pr-new

pkg-pr-new Bot commented Sep 5, 2026

Copy link
Copy Markdown

Open in StackBlitz

pnpm add https://pkg.pr.new/rsbuild-plugin-react-router@8919456

commit: 8919456

@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Benchmark results

Case Base Head Delta
build-256-ssr 1555.3 ms 1541.0 ms -0.9%
dev-48-ssr 702.2 ms 700.5 ms -0.2%

@ScriptedAlchemy
ScriptedAlchemy deleted the docs/auto-external branch September 5, 2026 00:21
@codspeed-hq

codspeed-hq Bot commented Sep 5, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 1 untouched benchmark
⏩ 2 skipped benchmarks1


Comparing docs/auto-external (8919456) with main (3ecef1b)2

Open in CodSpeed

Footnotes

  1. 2 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

  2. No successful run was found on main (977ce26) during the generation of this report, so 3ecef1b was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

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