oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
73.26k stars 2.69k forks source link

Add `compile` to `Bun.build` #13079

Open huseeiin opened 1 month ago

huseeiin commented 1 month ago

What is the problem this feature would solve?

originally requested by discord user: image

What is the feature you are proposing to solve the problem?

being able to compile a bun executable from js

What alternatives have you considered?

Bun.$`bun build index.js --compile --outfile build`
GerbenRampaart commented 1 month ago

Was just looking for why compile wasn't part of bun build.

I solved it with spawn but I like your bun shell solution better I think.