简体   繁体   English

如何使用Vue Cli 3配置Webpack-simple?

[英]How to configure Webpack-simple with Vue Cli 3?

Just to make it easier, I'm new to Vue Cli and Vue as whole. 为了简化起见,我是Vue Cli和Vue整体上的新手。

In Vue Cli 2, I think it was something like this: 在Vue Cli 2中,我认为是这样的:

Vue init webpack-simple xxx

But now in the newest major update (3) it is like this: 但是,在最新的主要更新(3)中,它是这样的:

Vue create xxx

And it can't you give an option to install Webpack-simple 而且您不能选择安装简单的Webpack

I tried to do this https://cli.vuejs.org/guide/webpack.html#simple-configuration but I'm not sure that it's what I want. 我尝试这样做https://cli.vuejs.org/guide/webpack.html#simple-configuration但我不确定这就是我想要的。 Is it? 是吗?

You need to install @vue/cli-init for init to work with vue cli 3. 您需要安装@vue/cli-init init才能使用vue cli 3进行init

Vue docs : Vue docs

Vue CLI 3 uses the same vue binary, so it overwrites Vue CLI 2 (vue-cli). Vue CLI 3使用相同的vue二进制文件,因此它会覆盖Vue CLI 2(vue-cli)。 If you still need the legacy vue init functionality, you can install a global bridge: 如果仍然需要旧版Vue初始化功能,则可以安装全局网桥:

npm install -g @vue/cli-init
# vue init now works exactly the same as vue-cli@2.x
vue init webpack my-project

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM