yarn使用vite创建项目
yarn create vite
yarn安装项目依赖
yarn
yarn启动vite测试环境
yarn dev
yarn打包,指定打包环境
yarn build
yarn build --mode=production
yarn build --mode=development
yarn build --mode=test
yarn的vite预览
yarn preview
yarn添加依赖
yarn add xxxx
项目创建完成后端项目描述文件package.json
{
"name": "nbigscreenweb",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"dependencies": {
"vue": "^3.4.35"
},
"devDependencies": {
"@vitejs/plugin-vue": "^5.1.2",
"vite": "^5.4.0"
}
}