Skip to content

Getting Started ​

Requirements ​

ToolVersion
Node.js>= 20.10.0
pnpm>= 9.12.0

The repository maintains only pnpm-lock.yaml. Do not mix npm, Yarn, and pnpm.

Install and Run ​

bash
git clone https://github.com/sunniejs/vue-h5-template.git
cd vue-h5-template
git switch vue-h5-template
pnpm install
pnpm dev

Vite listens on local network interfaces and prints a URL that can be opened from a phone on the same network.

Commands ​

CommandPurpose
pnpm devStart the development server
pnpm buildBuild production assets into dist
pnpm previewPreview the production build locally
pnpm lintRun ESLint
pnpm typecheckCheck Vue and TypeScript types
pnpm testRun Vitest
pnpm checkRun lint, typecheck, test, and build

First Configuration ​

  1. Review .env.example and set VITE_API_TARGET for your backend.
  2. Keep only the routes your application needs in src/router/routes.ts.
  3. Select a primary UI library and remove the other examples and dependencies.
  4. Run pnpm check before committing.

Released under the MIT License