Vue2,Vue3,React,vue-cli和Vite创建和启动

vue2-project

创建项目

vue create xxx名字

下依赖包

npm install

启动项目

npm run serve

项目打包

npm run build

vue3-project

创建项目

vue create xxx名字

下依赖包

npm install

启动项目

npm run serve

项目打包

npm run build

修复错误的配置

npm run lint

Vite创建-vue3

创建项目

# npm 版本, 安装vu3之前需要检查npm版本号,对号入座:
npm -v 

# npm 6.x
npm init vite@latest my-vue-app --template vue

# npm 7+, 需要额外的双横线:
npm init vite@latest my-vue-app -- --template vue

安装依赖

npm i

启动项目

npm run dev

VSC安装vue3配套插件Volar

React-project

安装

全局安装npm i -g create-react-app或者yarn global add create-react-app。

创建项目

create-react-app xxx(名字)

项目打包

npm run build

项目启动

npm start(默认localhost:3000) 
posted @ 2022-09-29 12:18  睡不醒的阿星  阅读(90)  评论(0)    收藏  举报