Open the terminal in VSC and run the following command. When asked include the Vue Router, Pinia, ESLint and Prittier and say Yes to “Skip all example code and start with a blank Vue project?”
$npm create vue@latest
Now run the commands that are printed on the console (shown below). Replace APP_NAME with the name of the directory that was created for your app.
cd APP_NAME npm install npm run format npm run dev
Remove the following files.
- public/favicon.ico
- src/stores/counter.js
Change the title in the <title> tag in index.html.
index.html loads main.js. No changes are needed in main.js.
main.js injects the App.vue SFC into the <div id="app"> element in index.html. Remove the contents within the <template> element in App.vue.
Create a directory named views and a directory named components inside the src directory for later use.