1.6 KiB
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
npmextraimport tosmartconfigin plugins.ts - Fixed rolldown deprecation:
inlineDynamicImportsreplaced withcodeSplitting: 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
TsBundlespawns child processes usingsmartspawn.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(previouslynpmextra.json) - Config key:
@git.zone/tsbundlewithbundlesarray - Supports
bundleandbase64tsoutput modes - Interactive init wizard via
tsbundle init
CLI Usage
- Default bundler:
tsbundle(uses esbuild) - Specify bundler:
tsbundle --bundler=rolldownortsbundle --bundler=rspack - Production mode:
tsbundle --production - Combined:
tsbundle --bundler=rolldown --production
Known Issues
- Rolldown emits a warning about
preserveValueImportsin tsconfig - this is informational only