Vite is a bridge between Craft CMS/Twig and the next generation frontend build tool Vite.js
Vite allows for Hot Module Replacement (HMR) of JavaScript, CSS, and Twig (even through errors) during development, as well as optimized production builds.
Vite supports both modern and legacy bundle builds, as per the Deploying ES2015+ Code in Production Today article.
Vite also handles generating the necessary <script>
and <link>
tags to support both synchronous and asynchronous loading of JavaScript and CSS.
Additionally, Vite has a caching layer to ensure optimal performance.