Small knowledge, big challenge! This paper is participating in theEssentials for programmers”Creative activities.

Step by step to create a Vue3 project

One: environment building

Install the node

!!!!!!!!! Node version ≥ 8.9

Install the vue – cli

You can install the new package using any of the following commands:

npm install -g @vue/cli
# OR
yarn global add @vue/cli
Copy the code

Use this command to check if the version is correct after installation

vue --version
Copy the code

To upgrade the global Vue CLI package, run the following command:

NPM update -g@vue /cli # or YARN Global upgrade --latest @vue/cliCopy the code

Two: Create a new project

new

Run the following command to create a new project:

vue create <Project Name>
Copy the code

Custom Configuration

Customize the configuration by using arrow keys (press space to select/deselect, A key to select/deselect all, I key to deselect)

Create routing

To create a route in history mode, select Y

CSS preprocessor

It is mainly used to simplify CSS code

ESLint

ESLint + Prettier, a plug-in for detecting javascript code, ESLint + Prettier is commonly used

Lint on save

Lint on save // Checks on save // lint and fix on commit // Checks on fix and commitCopy the code

Unit testing

Again, it’s about individual needs

Storage configuration

The first is the individual folder location and the second is in the package.json file

Save the configuration

Whether to save the configuration (y: record the configuration and give a name. N: This configuration is not recorded.)

Begin to compile

It’s done at this point

run

CD my-project // Go to the root directory NPM run serve // Start the projectCopy the code

The last

Go ahead and create your own VUE3 project