如何在 vue create 中选择 npm over yarn

Bri*_*ian 3 npm vue.js yarnpkg

我想创建一个 Vue 项目,我想使用npm.

在终端中,当我这样做时vue create hello,默认情况下yarn用作包管理器。

那么如何直接用npm而不是开始yarn呢?

con*_*exo 5

只需键入vue create --help即可找出 vue create 命令提供的选项。

vue create hello --packageManager npm
Run Code Online (Sandbox Code Playgroud)

就是你要找的。