Hacker News new | past | comments | ask | show | jobs | submit login

I really don't understand vite. They use esbuild under the hood for some of the tasks, but they still ultimately use rollup. I tried to use it for a project I'm working on and it was more than 50 times slower than esbuild. (esbuild took half a second, vite took 30 seconds).



It uses esbuild for unbundled dev builds and Rollup for bundled production builds.

https://vitejs.dev/guide/why.html#why-bundle-for-production


Vite's goal is a mixture of speed and flexibility. Rollup's plugin system provides the flexibility in exchange for slower build times, but that doesn't affect development speed, because Vite doesn't bundle anything in development (apart from CommonJS dependencies, which are pre-bundled with esbuild).


Vite's main focus is on a fast dev server and provide ultra fast hmr.

However, it needs source (user code and npm packages) to be in ESM modules, so it uses esbuild for pre bundling npm packages.

And vite uses roll-up to create a production build with some parts done by esbuild


As other comments have mentioned, they use Roll-up under the hood.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: