foreword
This article mainly explains how to use vite+vue to create the first project and the basic knowledge points of vue3
1. Create a vue3 project
Here we mainly introduce how to use vite+vue3 to create a project
1. about vite
Vite (French for "quick", pronounced
/vit/
, pronounced like "veet") is a new front-end building tool that can significantly improve the front-end development experience. It mainly consists of two parts:
A development server that provides rich built-in features based on native ES modules , such as amazingly fast Hot Module Updates (HMR) .
A set of build instructions that packages your code using Rollup , and it comes pre-configured to output highly optimized static assets for production use.
Vite intends to provide out-of-the-box configuration, while its plugin API and JavaScript API bring a high degree of extensibility and have complete type support.
2. Build the first Vite project
Use npm:
npm create vite@latest
Using Yarn:
yarn create vite
Create steps:
If you see the picture below, it means that your first vue3 project has been successfully created!