As the title suggests, I’d like to hear your opinion of the idea to replace esbuild with bun.js, since it recently received its 1.0 release. The release trailer can be found here: https://www.youtube.com/watch?v=ThyMiimsAA0, more infos about bun you can find here: https://bun.sh/
For those who haven’t heard of it: bun is supposed to be a drop-in replacement for nodeJS and Deno. It as also a package manager so it replaces npm etc, and it comes with its own test suite. Written in Zik (https://ziglang.org/), it seems much faster than node and deno.
Now, I know that Phoenix switched to esbuild quite recently, however bun seems to outperform esbuild, and can also be used as a test framework and even as a runtime, in case you need some service written in JS. So, as it looks like, it would be everything esbuild is (a bundler) but faster, and more. There’s already support for many frameworks, and I think it would be great if you could spin up a Phoenix app, and combine it for example with a single page application of your choice out of the box.
What is your opinion about this? Would you prefer to stick with esbuild for now, or do you think it would make sense to switch again?
This was at Bun’s GitHub repo. So it’s not possible to replace esbuild now because Bun doesn’t have Windows support.
Windows users — Bun does not currently provide a native Windows build. We’re working on this; progress can be tracked at this issue. In the meantime, use one of the installation methods below for Windows Subsystem for Linux.
Yes I forgot about Typescript support and the Windows issue. Well, that will be solved at some point, and I also would not suggest you replace esbuild right with an 1.0 version anyway but wait a bit until first production experience reports are in. But given that windows support is there, and we can see in many places reports like “we switched from node to bun and it is awesome”, would you like to have the switch to bun then?
This has been on my mind since Bun released version 1.0. I’ve published a package today to integrate Bun with Elixir which is heavily based on the Esbuild package.