How to add Vue to an existing project using Vue CLI
Subscribe to my newsletter and never miss my upcoming articles
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:
- Open your terminal and cd into your project's root directory.
- Now, Instead of using
vue create my-project-name, use
(Yes, That's a dot).
vue create .
- You will be prompted if you want to add vue to an existing project,
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!