Using Vite
Vite.js is the build management tool aiming to do the following:
- Help you develop faster (locally develop your project with a more time-saving approach)
- Build with optimization (bundle files for production with better performance)
- Manage other aspects of your web project effectively (testing, linting, and so on)
It uses a Rollup bundler under the hood to perform chunk bundling and packaging of JavaScript projects.
Starting from Vue 3, Vite has replaced Vue CLI and become the default build tool for managing your Vue applications. Vite also supports TypeScript and provides a leaner developer experience when working on current web projects.
To initialize a new Vue project with Vite, you can use the following specific command:
npm init vue@latest
In this case, you will need to provide additional configurations for Vite to proceed, as shown in Figure 3.1:
Figure 3.1 – Configuration prompt for a new Vue project...