default(bunOptions?: BunOptions): BunPlugin
bun plugin
Also, check the Plugins – Runtime | Bun Docs & Plugins – Bundler | Bun Docs for more details.
Example 1
Example 1
// build.ts import UnpluginTypia from '@ryoppippi/unplugin-typia/bun' Bun.build({ entrypoints: ['./index.ts'], outdir: './out', plugins: [ UnpluginTypia({ /* your options *\/}) ] })
$ node build.ts
Example 2
Example 2
// preload.ts import { plugin } from 'bun'; import UnpluginTypia from '@ryoppippi/unplugin-typia/bun' plugin(UnpluginTypia({ /* your options *\/}))
preload = ["./preload.ts"] [test] preload = ["./preload.ts"]
$ bun run ./index.ts
When you run your scripts on Bun.runtime, You cannot use named import for typia value in the source code. Check out the README.md.
optional
bunOptions: BunOptions