The pre-requisite for this recipe is as follows:
- Node.js 12+
The Node.js global objects that are required are as follows:
- @vue/cli
- @vue/cli-service-global
We will need to create a new Vue project with Vue-CLI, or use the project created in previous recipes:
- We need to open Terminal (macOS or Linux) or the Command Prompt/PowerShell (Windows) and execute the following command:
> vue create router-import
- The CLI will ask some questions that will help with the creation of the project. You can use the arrow keys to navigate, the Enter key to continue, and the spacebar to select an option.
- There are two methods for starting a new project. The default method is a basic babel and eslint project without any plugins or configuration, and the Manually mode, where you can select more modes, plugins, linters, and options. We will go for Manually:
? Please pick a preset: (Use arrow keys)
default (babel, eslint)
❯ Manually select features
- Now we are asked...