belaustegui
Hi!
Bun is a new all-in-one toolkit for Javascript: bundler, test runner, package manager, dev. environment, etc. It can do what Esbuild does, and more.
I’ve just published a package heavily inspired in the Esbuild integration package made by Wojtek Mach and José Valim that is adapted to install and invoke Bun.
I am using it in a personal project of mine and the switch from Esbuild requires very minimal changes. Then, it allows you to install and the many node packages available without requiring NodeJS or NPM. It also supports TypeScript, JSX, CSS, WASM, and many more (even Rust!).
Anyway. If you want to check it out you can take a look at the GitHub Repo and the Hex.pm package.
Thanks again to @josevalim and @wojtekmach for creating the Esbuild packge
which I used as a base.
Trending in Announcing
Other Trending Topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #ai
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #elixirconf-eu
- #metaprogramming
- #hex










Showing Posts 25 to 16- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
greven
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! =)
lud
Hello,
Do you have an example of running JS code from elixir in a safe/sandbox way with bun?
belaustegui
I’ve just released a bun 1.6.0 which contains multiple improvements for:
Check out the GitHub Repo and the Hex.pm package for extra details!
D4no0
This is actually extremely nice, because I am tired of always researching a new not “deprecated” way to install node when building release containers.
LostKobrakai
bun’s bundler api is heavily inspired by esbuild, but you can read how they differ here: esbuild - Bun
hauleth
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.jsonwith ease without any additional steps.D4no0
Looks like for phoenix builds
bunlooks exactly likeesbuild, are there any notable differences in this regard?belaustegui
Hi all!
I’ve just released bun 1.3.1 which contains more improvements for process wrapping. Now we just wrap
bun build. This allows you to usebun runto call other commands (for examplebun run tailwindto build your CSS without using the Elixir Tailwind package).Thanks @Sgoettschkes for reporting this and following up with a detailed investigation.
Check out the GitHub Repo and the Hex.pm package for the release notes and code.
Happy coding!
znewbiez1001
Oh I see, now it works. Thanks bro!
belaustegui
Interesting. Bun supports only Elixir 1.15 and newer versions. In fact it uses Mix.ensure_application!1 which is only available from Elixir 1.15.