Getting Started with Vite and Vue

View saved

Why Vite + Vue

Vite gives Vue a fast local dev server with hot module replacement. You change a component and see updates quickly.

Create a project

Need Node.js and npm first.

npm create vite@latest my-vue-app -- --template vue
cd my-vue-app
npm install
npm run dev

Open the app

Visit the local URL Vite prints (often http://localhost:5173). You should see the default Vue starter page.

Know the key files

  • index.html — HTML shell
  • src/main.js — creates and mounts the app
  • src/App.vue — root single-file component
  • src/components/ — reusable pieces

Comments

One comment per signed-in account. Comments are saved with this page’s URL.