feat(config): migrate project configuration to smartconfig.json and update bundler dependencies
This commit is contained in:
+18
-41
@@ -1,12 +1,15 @@
|
||||
# tsbundle Hints and Findings
|
||||
|
||||
## Recent Updates (2025-11-23)
|
||||
## Recent Updates (2026-03-24)
|
||||
|
||||
- Migrated from @push.rocks/smartfile v11 to @push.rocks/smartfs v1.1.0
|
||||
- All filesystem operations now use async smartfs API
|
||||
- Removed @push.rocks/tapbundle (now imported from @git.zone/tstest/tapbundle)
|
||||
- All bundlers (esbuild, rolldown, rspack) updated to latest versions
|
||||
- Removed deprecated rolldown experimental.enableComposingJsPlugins option
|
||||
- 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
|
||||
|
||||
@@ -16,41 +19,16 @@
|
||||
|
||||
## Bundler Implementations
|
||||
|
||||
- **esbuild** (default): Fully implemented, production ready, 3.9K minified
|
||||
- **rolldown**: Implemented and working (beta v1.0.0-beta.51), produces smallest bundles (1.0K minified)
|
||||
- **rspack**: Implemented and working (v1.6.4), webpack-compatible API, 6.3K minified
|
||||
- **rollup**: Removed (was never implemented)
|
||||
- **parcel**: Removed (was never implemented)
|
||||
- **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
|
||||
|
||||
## Adding New Bundlers
|
||||
## Configuration
|
||||
|
||||
To add a new bundler, you need:
|
||||
|
||||
1. Update `ICliOptions` interface to include the bundler name
|
||||
2. Add case in `getBundlerPath()` switch statement
|
||||
3. Create `mod_<bundler>/` directory with:
|
||||
- `plugins.ts`: Import and re-export the bundler
|
||||
- `index.child.ts`: Implement TsBundleProcess class with buildTest() and buildProduction()
|
||||
4. Add bundler to package.json dependencies
|
||||
|
||||
## Rolldown Specific Notes
|
||||
|
||||
- Rolldown is in beta (v1.0.0-beta.18) but working well
|
||||
- API: Use `rolldown()` function directly, not `rolldown.rolldown()`
|
||||
- Output options go in the `write()` method, not the initial config
|
||||
- Uses `dir` and `entryFileNames` instead of `file` for output (handles dynamic imports)
|
||||
- Includes `inlineDynamicImports: true` to avoid chunk splitting issues
|
||||
- Produces smaller minified bundles than esbuild (1.5K vs 2.2K in tests)
|
||||
- Supports TypeScript via `resolve.tsconfigFilename`
|
||||
|
||||
## Rspack Specific Notes
|
||||
|
||||
- Rspack v1.3.15 - stable and production ready
|
||||
- Uses webpack-compatible API (callback-based)
|
||||
- Built-in SWC loader for TypeScript transpilation
|
||||
- Produces larger bundles than esbuild/rolldown due to webpack runtime overhead
|
||||
- Best choice if you need webpack compatibility or advanced features
|
||||
- Supports ES modules output via `experiments.outputModule: true`
|
||||
- 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
|
||||
|
||||
@@ -61,5 +39,4 @@ To add a new bundler, you need:
|
||||
|
||||
## Known Issues
|
||||
|
||||
- esbuild recently had splitting and tree-shaking disabled due to issues
|
||||
- The README still mentions "a bundler using rollup" but uses esbuild by default
|
||||
- Rolldown emits a warning about `preserveValueImports` in tsconfig - this is informational only
|
||||
|
||||
Reference in New Issue
Block a user