Bun - an installer for JavaScript Bun

Bun is full JS runtime, not just bundler. That mean that you can also run NPM packages using Bun, which IIRC is not possible with ESbuild. For example I switched from Tailwind to just PostCSS and I can use “regular” package.json with ease without any additional steps.

2 Likes

bun’s bundler api is heavily inspired by esbuild, but you can read how they differ here: vs esbuild – Bundler | Bun Docs

1 Like

This is actually extremely nice, because I am tired of always researching a new not “deprecated” way to install node when building release containers.

I’ve just released a bun 1.6.0 which contains multiple improvements for:

  • Pooling process support – execute JS using Bun with efficient process reuse without the overhead of constantly spawning new processes.
  • Phoenix support – better docs for colocated JS and Hooks in new projects using the latest Phoenix versions.

Check out the GitHub Repo and the Hex.pm package for extra details!

3 Likes

Hello,

Do you have an example of running JS code from elixir in a safe/sandbox way with bun?

Thanks for your work. I’ve been using it for my personal website and it has been stellar, only thing missing was really figuring out how colocated JS would work, so thanks for that! =)