Our great sponsors
-
zig
General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
Vite is a fast local development server, which uses a bundler to create the bundle of JS that the client receives. It currently uses two bundlers, actually.
Bun is not just a Node replacement, but a Zig port of esbuild (initially the same fast algorithm), so includes it's own (currently limited) bundler:
Vite has Hot Module Reloading (HMR), which is important for fast local development. Bun's HMR currently has at least one open issue.
For production, Vite can use another bundler, esbuild, to speed up transpilation and minification, while it in production also uses the bundler Rollup to create the client side JS bundle, due to Rollup's flexible API. Even though Vite uses ESM in development environment, for speed. In the future Vite may use esbuild entirely for bundling instead of Rollup, due to the speed it would gain.