# vitejs

https://cn.vitejs.dev/

# 搭建第一个 Vite 项目

# npm
npm init [email protected] my-vue-app -- --template vue
# yarn
yarn create vite my-vue-app --template vue
1
2
3
4
yarn create vite vue3-startup --template vue
1
{
  "scripts": {
    "dev": "vite", // 启动开发服务器,别名:`vite dev`,`vite serve`
    "build": "vite build", // 为生产环境构建产物
    "preview": "vite preview" // 本地预览生产构建产物
  }
}
1
2
3
4
5
6
7
// vite.config.js
1