@boperators/plugin-bun
v0.2.1
Published
Bun plugin for boperators - transforms operator overloads at runtime.
Downloads
455
Maintainers
Readme
@boperators/plugin-bun

Bun plugin for boperators that ensures operator overloads work when running TypeScript files directly with Bun, instead of requiring an intermediate transform step.
Installation
bun add -D boperators @boperators/plugin-bunSetup
This plugin is enabled in your Bun config file, bunfig.toml:
preload = ["./node_modules/@boperators/plugin-bun/index.ts"]Alternatively, instead of a long file path, create a preload.ts file in your project root:
import "@boperators/plugin-bun";and reference that in your bunfig.toml:
preload = ["./preload.ts"]Comparison with Other Approaches
| Approach | When it runs | Use case |
|----------|-------------|----------|
| @boperators/cli | Before compilation | Batch transform to disk, then compile normally |
| @boperators/plugin-tsc | During compilation | Seamless tsc integration, no intermediate files |
| @boperators/webpack-loader | During bundling | Webpack projects, integrates into existing build pipeline |
| @boperators/plugin-vite | During bundling | Vite projects, integrates into Rollup-based pipeline |
| @boperators/plugin-esbuild | During bundling | ESBuild projects, fast bundler integration |
| @boperators/plugin-bun | At runtime | Bun-only, transforms on module load |
License
MIT
