全局安装
yarn global add create-vite-app
指定版本: yarn global add create-vite-app @xxx
Vite 创建 Vue 3 项目
yarn create vite-app my-site
cd my-site
yarn
yarn dev
运行输出:
❯ yarn dev
yarn run v1.22.10
warning package.json: No license field
$ vite
vite v1.0.0-rc.4
[vite] Optimizable dependencies detected:
vue
Dev server running at:
> Local: http://localhost:3000/
> Network: http://192.168.1.100:3000/
编译:
yarn build
powershell无法执行yarn
以管理员身份执行RemoteSigned (远程签名)
执行:set-ExecutionPolicy RemoteSigned
网友评论