Vue Local Development Guide

Create projects with Vue 3 and Vite, featuring hot module replacement on localhost:5173, compatible with Vue Router and Pinia.


Vue is a progressive JavaScript framework, and using it with Vite is the officially recommended modern local development approach, suitable for SPAs, admin dashboards, and component libraries.

Quick Start

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

Alternatively, use the generic Vite template:

npm create vite@latest my-app -- --template vue-ts

Default localhost Access

PurposeAddress
Development Serverhttp://localhost:5173
Preview Buildhttp://localhost:4173

Common Commands

CommandDescription
npm run devStart the Vite development server
npm run buildBuild to dist/
npm run previewPreview the production build

Ecosystem Extensions

  • Vue Router: Client-side routing
  • Pinia: State management
  • Nuxt: Full-stack / SSR framework (similar to Next.js for React)

For SSR or file routing needs, consider Nuxt (the full-stack framework for Vue).

Summary

Vue + Vite local development can be accessed at http://localhost:5173, with a gentle learning curve, making it suitable for quickly building interactive interfaces.

访客计数:------ Best viewed in Netscape Navigator · 800×600 © LocalHost Run