Skip to content

Why does Vite use both rollup and ESBuild rather than just ESBuild? #7622

Answered by faroukfaiz10
knpwrs asked this question in Q&A
Discussion options

You must be logged in to vote

https://vitejs.dev/guide/why.html#why-not-bundle-with-esbuild might also provide more insights.

Also pasted verbatim here for a self-contained reference:

Vite's current plugin API isn't compatible with using esbuild as a bundler. In spite of esbuild being faster, Vite's adoption of Rollup's flexible plugin API and infrastructure heavily contributed to its success in the ecosystem. For the time being, we believe that Rollup offers a better performance-vs-flexibility tradeoff.
Rollup has also been working on performance improvements, switching its parser to SWC in v4. And there is an ongoing effort to build a Rust-port of Rollup called Rolldown. Once Rolldown is ready, it could replace bot…

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@yann-combarnous
Comment options

Comment options

You must be logged in to vote
2 replies
@00155837364765867
Comment options

@Brandin-Canterbury
Comment options

Answer selected by sapphi-red
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
7 participants