0

I'm following a tutorial on a site about creating SPA. At some point it instructs to init the vue app this way:

vue init webpack-simple my-project

This, doesn't work for me. After 1 hour of searching through stack overflow I have found that for vue-cli 3.x (the version I'm using) the syntax has changed and now I must use:

vue create my-project

My question is, how do I init a project based on the webpack-simple template. This way of initing/creating a project asks some questions when the command is executed, but it says nothing about webpack. So, I'm a bit confused.

Thanks in advance.

3
  • do you really want webpack-simple in your project? Commented Jul 6, 2018 at 10:42
  • "This, doesn't work for me." Could you explain more what issues are you running into? Commented Jul 6, 2018 at 10:54
  • 1
    Init the project and find for yourself. In cli 3.0 you have no strict template, but a wizard or standard bundle based on webpack that can be treated as "simple". Commented Jul 6, 2018 at 10:54

1 Answer 1

2

vue cli 3 has moved on to implement a plugin based approach rather than template-based approach.

If you still want to create a project using init you can install a global bridge:

npm install -g @vue/cli-init
# vue init now works exactly the same as [email protected]
vue init webpack-simple my-project

Reference - Pulling 2.x template

The project created by vue cli 3 uses webpack under the hood. The webpack configuration(webpack.config.js) is created at runtime. You should use vue.config.js to configure webpack

Sign up to request clarification or add additional context in comments.

1 Comment

ahhh, this is the confirmation I needed :). So, I will use the vue-cli 3.x way!. Thanks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.