Files
tsbundle/readme.hints.md

1.6 KiB

tsbundle Hints and Findings

Recent Updates (2026-03-24)

  • Upgraded all dependencies to latest versions
  • Migrated from npmextra.json to smartconfig.json (renamed file, updated all references)
  • Renamed npmextra import to smartconfig in plugins.ts
  • Fixed rolldown deprecation: inlineDynamicImports replaced with codeSplitting: false
  • Major version bumps: tsbuild ^3.1.2 -> ^4.3.0, TypeScript 5.9.3 -> 6.0.2
  • Rolldown upgraded from 1.0.0-beta.52 to 1.0.0-rc.11
  • @rspack/core upgraded from ^1.6.5 to ^1.7.10
  • @types/node upgraded from ^24.10.1 to ^25.5.0

Bundler Architecture

  • tsbundle uses a child process architecture where each bundler runs in a separate process
  • Configuration is passed via environment variables as JSON (IEnvTransportOptions)
  • The main class TsBundle spawns child processes using smartspawn.ThreadSimple

Bundler Implementations

  • esbuild (default): Fully implemented, production ready
  • rolldown: Implemented and working (1.0.0-rc.11), produces smallest bundles
  • rspack: Implemented and working (v1.7.10), webpack-compatible API

Configuration

  • Config file: smartconfig.json (previously npmextra.json)
  • Config key: @git.zone/tsbundle with bundles array
  • Supports bundle and base64ts output modes
  • Interactive init wizard via tsbundle init

CLI Usage

  • Default bundler: tsbundle (uses esbuild)
  • Specify bundler: tsbundle --bundler=rolldown or tsbundle --bundler=rspack
  • Production mode: tsbundle --production
  • Combined: tsbundle --bundler=rolldown --production

Known Issues

  • Rolldown emits a warning about preserveValueImports in tsconfig - this is informational only