Note
Because eslint does not support TypeScript 7, the current implementation temporarily allows for the coexistence of both 6 and 7.
This template helps you get started developing with Vue 3 and TypeScript in Vite. It uses Vue 3 <script setup vapor> SFCs; check out the script setup docs to learn more.
Includes vue-router and Pinia.
Additionally, ESLint, Stylelint, and Prettier are included and set to run automatically at runtime and on commit. (These settings are strict, so relax them as needed.)
When the development server runs, it is checked in real-time by vite-plugin-checker.
First, define VITE_APP_TITLE in your .env file.
This repository includes AGENTS.md, a guideline document for coding agents such as GitHub Copilot, Claude, and Cursor.
pnpm installpnpm devOpen http://localhost:5173 in your browser.
pnpm buildpnpm test:unit
pnpm test:e2e- Vue 3 + TypeScript + Vite combination
- Routing and state management with vue-router and Pinia
- Code quality management with ESLint, Stylelint, and Prettier
- Unit testing with Vitest
- E2E testing with Playwright
- Real-time type checking with vite-plugin-checker
- Strict linter settings to maintain high-quality code
VS Code + Vue (Official) (disable Vetur).
- Chromium-based browsers (Chrome, Edge, Brave, etc.):
- Firefox:
Designed to be close to create-vue commands.
| Command | Description |
|---|---|
dev |
Start development server |
lint |
Run all linters |
lint:oxlint |
Run oxlint |
lint:eslint |
Run ESLint |
lint:style |
Run Stylelint |
test |
Run Vitest |
test:unit |
Run unit tests |
test:coverage |
Output coverage report |
test:e2e |
Run E2E tests |
build |
Build for production |
build:analyze |
Execute Bundle Analyzer |
build:clean |
Clear production build files |
build-only |
Build for production without checking (for deploy) |
clean |
Clear artifacts |
clean:hard |
Clear artifacts and development cache. |
type-check |
Check Vue markup |
preview |
Run the program generated by the production build |
TypeScript cannot handle type information for .vue imports by default, so they are shimmed to be a generic Vue component type. In most cases, this is fine if you don't care about component prop types outside of templates. However, if you wish to get actual prop types in .vue imports (for example, to get props validation when using manual h(...) calls), you can enable Volar's .vue type support plugin by running Volar: Switch TS Plugin on/off from the VSCode command palette.
When using this template, follow the checklist to update your info properly.
- Change the author name in
LICENSE - Change the favicon in
public - Remove the
.githubfolder which contains funding info - Review and adapt
AGENTS.mdfor your project conventions - Clean up the READMEs and remove routes
- vite-vue3-ts-starter
- vite-vuetify-ts-starter - With Vuetify 3
- tauri-vuetify-starter - For cross-platform desktop application use.
- rsbuild-vue-starter - Built with Rsbuild stack instead of Vite