为了方便起见,我对 Vue Cli 和整个 Vue 都是新手。
在 Vue Cli 2 中,我认为是这样的:
Vue init webpack-simple xxx
但现在在最新的重大更新(3)中它是这样的:
Vue create xxx
你不能提供安装 Webpack-simple 的选项
我尝试这样做 https://cli.vuejs.org/guide/webpack.html#simple-configuration 但我不确定这是否是我想要的。是吗?
最佳答案
您需要安装 @vue/cli-init
以使 init
能够与 vue cli 3 配合使用。
Vue docs :
Vue CLI 3 uses the same vue binary, so it overwrites Vue CLI 2 (vue-cli). If you still need the legacy vue init functionality, you can install a global bridge:
npm install -g @vue/cli-init
# vue init now works exactly the same as <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="f2848797df919e9bb2c0dc8a" rel="noreferrer noopener nofollow">[email protected]</a>
vue init webpack my-project
关于javascript - 如何使用 Vue Cli 3 配置 Webpack-simple?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51541615/