How to add Vue to an existing project using Vue CLI

How to add Vue to an existing project using Vue CLI

Hey, It's me again...

So earlier this week, I started working on a new Vue project and I quickly ran into the problem of adding vue to an existing project. Before now, I have only created new Vue projects using the vue create project-name command from vue CLI. However, the procedure is a bit different if you want to add vue to an existing project.

Do note that this article is based on the current version of Vue CLI (v4.4.6 as at the time of writing this article. )

So here's all you have to do:

  1. Open your terminal and cd into your project's root directory.
  2. Now, Instead of using vue create my-project-name, use
    vue create .
    
    (Yes, That's a dot).
  3. You will be prompted if you want to add vue to an existing project,
    Type Y Screenshot from 2020-07-20 05-18-41.png

Then fill out the vue configuration prompts as you would do when creating a new vue project.

That's all. I was inspired to write this post since as I couldn't find the solution on the Vue CLI docs.

Till next time... Thanks for reading!