5 ms·
Why aren’t we comparing to ESBuild?
by ccorcos 2y ago
Why aren’t we comparing to ESBuild?
- graypegg 2y agoVite uses ESBuild under the hood. https://github.com/farm-fe/performance-compare?tab=readme-ov-file#performance-compare https://github.com/farm-fe/performance-compare?tab=readme-ov... The production build metric here would be ESBuild + a small amount of overhead from vite. (The HMR/dev build side of things is handled by Rollup instead with Vite) IMO, Vite (ESBuild/Rollup) are fast enough. Farm will need to get some time being used + abused by OTHER people's real projects before I'll be considering it in order to save what seems like maybe 2 minutes a day.
- oefrha 2y ago> The production build metric here would be ESBuild + a small amount of overhead from vite. (The HMR/dev build side of things is handled by Rollup instead with Vite) That’s completely backwards. Vite only uses rollup for production, which is why production build is slower. https://vitejs.dev/guide/why.html#why-not-bundle-with-esbuild https://vitejs.dev/guide/why.html#why-not-bundle-with-esbuil... The plan is to replace both esbuild and rollup with Rust-based rolldown (fast, and supports rollup’s plugin architecture) eventually. See https://www.youtube.com/watch?v=hrdwQHoAp0M https://www.youtube.com/watch?v=hrdwQHoAp0M.
- graypegg 2y agoOops, yep you’re right, I mixed them up.
- lenkite 2y agoI suppose we should wait until all tools move to Rust/Zig before learning modern front-end engineering to bypass the churn phase. Till then stick to plain HTML+CSS.
- johnny22 2y agofor the basics you can just use vite and nothing will change except what's underneath. it's only when you get fancy that you need to write your own plugins that would really be affected by this churn.
- crabmusket 2y agoI've been using webpack for the last 7 years. Major version upgrades can be a pain, but broadly it's fine. People hopping frameworks every 6 months are causing their own problems.
- alluro2 2y agoI fully agree with the sentiment - but for me there's also that I could remove 26 (!) dev dependencies and minutes off each build, in a medium-sized app, when replacing Webpack with Vite - so it's worth being in the loop at least to some extent.
- crabmusket 2y agoYep, that makes total sense. We're also looking at a Vite migration in the near future, but also making sure that whatever we do, we're leaning more on web standards and common functionality, and avoiding as much bundler specific stuff as possible. Back in the day is was cute that you could import GLSL fragments directly into your JS code. Now, not so much.
- pjmlp 2y agoAnd maybe then, we also get rid of node, and use compiled languages frameworks on the server.
- ccorcos 2y agoI don't understand what your need other than esbuild though... I guess it doesn't support HMR? I guess I just persist the frontend state of my app so I only need livereload... Just seems like so much wasted time and effort on marginal things. Just use ESBuild and start building something!
- aaaaaaabbbbbb 2y agoEsbuild lacks the featureful plugin API that Webpack and Rollup have. It's pretty easy to avoid dependencies that require transpiler/bundler plugins and still have a great set of dependencies, but it's a deal breaker for many.
- franky47 2y agoA comparison with Rolldown [1], the rewrite-in-rust of Rollup by the Vite team, would be more relevant, although it is still a work in progress. [1]: https://rolldown.rs/ https://rolldown.rs/