
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!
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.
Bun and React Server Components (RSC):
Bun RSC readme: github.com/oven-sh/bun/tree/main/p...
Tweets:
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 has some interesting potential for React Native:
Also Bun does not support React Fast Refresh, which is the best way to develop with HMR (github.com/oven-sh/bun/issues/18)
do you guys get errors too?
I tried it twice, Strapi and Nuxt and both times got error
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).