Vite 2.9 released, a new front-end build tool

Vite 2.9 has been released.

Major updates:

  • Improve cold start speed
  • Support for CSS Sourcemaps
  • Enhanced Web Workers
  • New tools for plugin and framework authors

Improve cold start speed

Before 2.9, Vite running dev on a project for the first time required a scan phase to discover dependencies and then pre-bundle them before starting the server. In 2.9, both scanning and pre-bundling dependencies are now non-blocking , so the server starts immediately during a cold start.

In addition, requests are now supported to flow in the pipeline, which improves initial cold-start load speed and increases the chance of discovering new missing dependencies when reprocessing and letting Vite populate the module graph and the browser process files. In many cases, a full page reload is also not required when new dependencies are discovered.

Experimental support for CSS Sourcemaps

This feature is currently experimental and disabled by default to avoid performance penalties for users who don't need it. To enable, set css.devSourcemap  to true .

Enhanced Web Workers

Web Workers now support generating source maps, along with improved robustness and fixes for several issues in older versions.

New tools for plugin and framework authors

  • Client Server Communication API
  • importedCss andto RenderedChunk type importedAssets 
  • Optimize Custom Extensions (experimental)

See Changelog for details .


Vite (French for "fast", pronounced /vit/, similar to veet) is a brand new front-end building tool. You can think of it as an out-of-the-box development server + packaging tool combination, but lighter and faster. Vite leverages the browser's native ES module support and tools compiled to native languages ​​(such as esbuild) to provide a fast and modern development experience.

How fast is Vite? Starting a Vite-based React application from scratch on  Repl.it  , when the browser page is loaded, CRA (create-react-app) has not even installed the dependencies.

If you haven't heard of what Vite is, you can read about the original intention of the project here . If you want to know how Vite is different from some other similar tools, you can refer to the comparison here .

Guess you like

Origin www.oschina.net/news/189188/vite-2-9-released
Recommended