yarn create vite做了什么工作

564 阅读1分钟

yarn create vite [<args>]

帮助你一次完成两件事情:

  • create-vite全局安装,或者如果软件包已存在,则将软件包更新为最新版本

  • 运行位于bin入门工具包领域的可执行文件package.json,将其转发<args>给它

所以 yarn create vite project-name(每次都会安装create-vite)相当于如下:

yarn global add create-vite

create-vite project-name

image.png

所以与npx create-vite project-name 还是略有区别的

image.png