Integrate Bun runtime into Nx monorepos with deterministic plugin setup, executor configuration, migration from Node.js toolchains, and cache-aware build/test workflows; use when adding the nx-bun plugin, converting projects, or standardizing Bun targets across Nx workspaces.
76
95%
Does it follow best practices?
Impact
—
No eval scenarios have been run
Passed
No known issues
Navigation hub for integrating Bun into Nx workspaces.
@nx-bun/nx.@nx-bun/nx and initialize the plugin.nx build my-api && nx test my-api && nx serve my-api and confirm all three exit with code 0 before proceeding. If validation fails: check executor configuration in project.json, run nx reset to clear stale cache, and retry. Resolve all failures before rolling out.bun add -D @nx-bun/nx
nx g @nx-bun/nx:init --unitTestRunner=bunExpected: plugin is installed and generators/executors are available.
nx g @nx-bun/nx:application api --directory=apps/backend --tags=runtime:bun,type:appExpected: Bun-ready app with Nx project configuration.
nx g @nx-bun/nx:convert-to-bun --project=my-apiExpected: project targets move to Bun executors while preserving Nx target structure.
nx build my-api
nx test my-api
nx serve my-apiExpected: build outputs generated, tests run under Bun test runner, serve target starts.
bun nx affected -t lint,test,build --base=main --parallel=3Expected: only changed projects execute with Nx scheduling.
npm install after bun add in a Bun-migrated workspace.bun test on the same suite without boundary@nx-bun/nx:test to same files.outputs and no tuned inputs.hot: true local serve.Bun.spawn is async and returns a handle; choose stdout/stderr piping explicitly.nx reset after plugin updates.| Topic | Reference |
|---|---|
| Bun runtime APIs, SQLite, and WebSockets | references/bun-runtime-api.md |
| Nx executor and caching configuration | references/nx-executor-configuration.md |
| Node.js to Bun migration checklist | references/migration-from-node.md |
| Bun testing in Nx | references/testing-with-bun.md |