Skip to content

chore(build): enable Rspack runtime mode - #1927

Merged
Timeless0911 merged 1 commit into
mainfrom
david/feat-rspack-runtime-mode-v2
Sep 16, 2026
Merged

Timeless0911 merged 1 commit into
mainfrom
david/feat-rspack-runtime-mode-v2

Conversation

@Timeless0911

Copy link
Copy Markdown
Contributor

Motivation

Enable Rspack's experimental runtime output for the three packages published from this repository. This reduces the internal runtime overhead and aligns the ESM bundle output with Rspack's named runtime bindings.

Changes

Configure tools.rspack.experiments.runtimeMode as "rspack" for @rslib/core, rsbuild-plugin-dts, and create-rslib. The generated runtime now uses named ESM exports such as rspackRequire and moduleFactories; create-rslib has no standalone runtime chunk and is unchanged.

Validation:

  • Built all three packages successfully.
  • Package tests passed: core 116, plugin-dts 30, create-rslib 39.
  • pnpm lint passed.
  • Generated JavaScript passed node --check and public ESM import smoke tests.
  • gzip size changed by -18 B for core and -52 B for plugin-dts; create-rslib was unchanged.

The option remains experimental in Rspack, so future Rspack minor releases may change its runtime output.

Copilot AI lite review requested due to automatic review settings September 16, 2026 08:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

All reviewed changes have been assessed with no unresolved blocking issues.

Pull request overview

Enables Rspack runtime mode for the three published packages.

Changes:

  • Configures runtimeMode: 'rspack' for core, plugin-dts, and create-rslib.
  • Preserves existing package-specific settings.
File summaries
File Description
packages/plugin-dts/rslib.config.ts Enables Rspack runtime mode.
packages/create-rslib/rslib.config.ts Enables Rspack runtime mode.
packages/core/rslib.config.ts Enables Rspack runtime mode.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@Timeless0911 Timeless0911 changed the title perf: enable Rspack runtime mode for release packages chore(build): enable Rspack runtime mode Sep 16, 2026
@Timeless0911
Timeless0911 merged commit abc8c1e into main Sep 16, 2026
12 checks passed
@Timeless0911
Timeless0911 deleted the david/feat-rspack-runtime-mode-v2 branch September 16, 2026 08:50
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