48 lines
585 B
Markdown
48 lines
585 B
Markdown
<h1>
|
|
Vite
|
|
<h3>构建项目</h3>
|
|
</h1>
|
|
|
|
### 创建项目
|
|
|
|
```bash
|
|
npm create vite@latest
|
|
# OR
|
|
yarn create vite
|
|
```
|
|
|
|
### 使用模板创建项目
|
|
|
|
```bash
|
|
# npm 6.x
|
|
npm create vite@latest my-vue-app --template vue
|
|
|
|
# npm 7+, extra double-dash is needed:
|
|
npm create vite@latest my-vue-app -- --template vue
|
|
|
|
# yarn
|
|
yarn create vite my-vue-app --template vue
|
|
|
|
# pnpm
|
|
pnpm create vite my-vue-app --template vue
|
|
```
|
|
|
|
<h1>
|
|
Vue CLI
|
|
<h3>构建项目</h3>
|
|
</h1>
|
|
|
|
### 安装
|
|
|
|
```bash
|
|
npm install -g @vue/cli
|
|
# OR
|
|
yarn global add @vue/cli
|
|
```
|
|
|
|
### 创建项目
|
|
|
|
```bash
|
|
vue create hello-world
|
|
```
|