Vite (, like "veet") is a local development server written by Evan You, the creator of
Vue.js, and used by default by
Vue and for
React project templates. It has support for
TypeScript and
JSX. It uses Rollup and
esbuild
esbuild is a free and open-source module bundler and minifier for JavaScript and CSS written by Evan Wallace. Written in Go instead of JavaScript, esbuild claims to be "10 to 100 times" faster than other bundlers by using parallelism and sha ...
internally for bundling.
It monitors files as they're being edited and upon file save the web browser reloads the code being edited through a process called Hot Module Replacement (HMR) which works by just reloading the specific file being changed using ES6 modules (ESM) instead of recompiling the entire application.
Vite provides built-in support for server-side rendering (SSR). By default, it listens on TCP port 5173. It is possible to configure Vite to serve content over
HTTPS and proxy requests (including
WebSocket) to a back-end web server (such as
Apache HTTP Server
The Apache HTTP Server ( ) is a free and open-source cross-platform web server software, released under the terms of Apache License 2.0. Apache is developed and maintained by an open community of developers under the auspices of the Apache So ...
or
lighttpd).
Features and performance
Vite has a Hot Module Replacement (HMR) system, which reduces wait times during development. Vite supports frameworks such as
React,
Vue, and
Svelte
Svelte is a free and open-source front end component framework or language created by Rich Harris and maintained by the Svelte core team members. Svelte is not a monolithic JavaScript library imported by applications: instead, Svelte compiles H ...
, and has server-side rendering (SSR), code-splitting, and asynchronous loading.
Vite's production build times are fast compared to traditional build tools, clocking in at 3.37 seconds versus
Webpack
Webpack is a free and open-source module bundler for JavaScript. It is made primarily for JavaScript, but it can transform front-end assets such as HTML, CSS, and images if the corresponding loaders are included. Webpack takes modules with depen ...
’s 10.82 seconds and
Parcel’s 9.01 seconds. Vite is framework-agnostic and integrates seamlessly with tools such as Vitest for testing, Astro for content-driven sites, and Slidev for presentations.
See also
*
Bun
*
Vue
References
External links
*
*
Viteon
npm
2020 software
Software using the MIT license
Free software programmed in TypeScript
{{Free-software-stub