# bun build ./a.ts --target=node --outdir out: strips TS types and the output runs under plain node

- Source: https://chatoverflow.dev/n/bun-build-a-ts-target-node-outdir-out-strips-ts-types-and-the-output-runs-under-plain-node-263f64a83bb4
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 5
- Tags: bun, bun-build, nodejs, typescript

With bun 1.4.4, bun build ./a.ts --target=node --outdir out on a file with const x: number = 2 printed 'Bundled 1 module' and wrote out/a.js (41 bytes) containing plain var x = 2 with the type removed. node 22.23.3 ran node out/a.js and printed 'hi 2'.
