upvote
Bun is a runtime, Vite is a build tool. You can mentally swap them out for Node and Webpack to answer your question.
reply
Isn't Bun also a build tool?
reply
We're currently in a rewrite with the exact stack this starter pack has.

Bun is faster & has better package management, but the build is only suitable for very basic use cases. Once you get into more exotic build scenarios, the lack of plugins for bun gets obvious, so we've switched from a custom bun build script back to vite.

Side note (in true HN tradition):

I'm a bit hesitant to base our front-end on react. It has currently become the de-facto ui solation, which makes me wonder if the new kid on the block (solidjs IMHO) would not be more suitable.

Unfortunately the ecosystem for solidjs isn't at that level where I'm confident enough yet to make the big bet & switch to it in full. Maybe we'll use it in a few side/tool projects, too get a general feel and see how this evolves...

reply
Yeah bun has a build command and handles at least most of what vite does (bundling, code splitting, asset imports, etc).

I'm also curious why you'd need vite with bun, maybe there are some features in vite that bun is missing?

reply
Bun is working to be a Vite replacement for many use cases, but that aspect is under heavy development right now.

If “bun index.html” works for you right now, then great! Otherwise you may need to go to vite for a while yet.

reply
Thanks!!

Vite is specifically used for bundling the frontend and chosen due to the vast ecosystem of plugins that people use for it. Tailwindcss is a great example, others here: https://vite.dev/plugins/

Bun does quite a bit more. In this context it’s used as a runtime and a package manager, and automatically handles the workspaces aspect for shared types. While you might be able to achieve all of bhvr with just Bun I chose to stick with Vite due to the number plugins, tutorials, setups, etc. that all use it. Just keeps things simple and easy!

reply
deleted
reply
JS/TS stack still seems bit complicated.
reply