You might have heard that Bun is not just a runtime, but also a bundler. So you might wonder:
Why do we need Vite or any separate bundler? Couldn'...
For further actions, you may consider blocking this person and/or reporting abuse
I think it's just too early to judge bun, it's still new and therefore has a lot of room for improvement, for example what woul bun 5 or 10.0 look like we should ask, let's not judge it now, the idea of having an all in one tool that handles the common js, es complexities is much more exciting for me and needs more exploration!
We are now in 2026 and Bun has not yet replaced VIte. So it's safe to say my prediction from September 2023 that "Bun won't replace Vite in the near future" was correct. Vite has actually had a meteoric rise in downloads since then, even outpacing NextJS and closely following React: npmtrends.com/next-vs-react-vs-vite
With forward-leaning frameworks such as TanStack Start and VikeJS being built on Vite, and the popular vanilla use of Vite with React, it seems like Vite is here to stay for a good while longer.
Thanks for this article, I was confused by Bun's own page and their statements that Bun can also be used for front-end development and front-end module bundling, while at the same time they don't give any clear examples. Manually adding Bun to Vite seems a bit unnecessary at the moment.
Thanks. Use Bun with Vite if you want to replace Node.
Update 2023-10-05:
Rolldown (a Rust based bundler) will replace Rollup and esbuild in Vite.
Update 2024-03-09:
Check out their landing page About section: rolldown.rs/about
Bun and React Server Components (RSC):
Bun RSC readme: github.com/oven-sh/bun/tree/main/p...
Tweets:
Bun has some interesting potential for React Native:
do you guys get errors too?
I tried it twice, Strapi and Nuxt and both times got error
Also Bun does not support React Fast Refresh, which is the best way to develop with HMR (github.com/oven-sh/bun/issues/18)
does bun will replace node.js as expected with Vite without any limitations?
It should work, but your experience may vary.
Here is the resolved Vite issue on the Bun repo:
github.com/oven-sh/bun/issues/250
See also the last part of the above article for a mention of Bun’s currently missing support for some Node API’s (like crypto).