美文网首页
用Vite创建Vue3项目

用Vite创建Vue3项目

作者: 一席桑麻 | 来源:发表于2021-02-05 10:28 被阅读0次

全局安装

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

相关文章

网友评论

      本文标题:用Vite创建Vue3项目

      本文链接:https://www.haomeiwen.com/subject/ocywtltx.html