怎样使用 Vue-CLI 创建 Vue3 项目

首先,需要安装 Vue-CLI,版本大于 4.5.4,然后使用 vue create <project-name>初始化项目;

然后,项目初始化使用选项3:Manually select features,选择这几项,然后回车:

Vue CLI v5.0.0-beta.0
? Please pick a preset: Manually select features
? Check the features needed for your project:
 (*) Choose Vue version
 (*) Babel
>(*) TypeScript
 ( ) Progressive Web App (PWA) Support
 ( ) Router
 ( ) Vuex
 ( ) CSS Pre-processors
 (*) Linter / Formatter
 ( ) Unit Testing
 ( ) E2E Testing

下一步选择 Vue 版本,此时选择 3.x:

Vue CLI v5.0.0-beta.0
? Please pick a preset: Manually select features
? Check the features needed for your project: Choose Vue version, Babel, TS, Linter
? Choose a version of Vue.js that you want to start the project with
  2.x
> 3.x

后面的配置步骤视情况选择。

原文地址:https://www.cnblogs.com/aisowe/p/15245755.html