Vite-Vue is a scaffold project for quickly setting up a Vue 3 application with Vite, providing an integrated solution for using Pinia, Vue Router, Tailwind CSS, and other essential libraries.
https://famous-sundae-c5aa5b.netlify.app/
- Pre-configured with Vite for fast development and optimized builds
- Integrated styling solution using Tailwind CSS and SASS support for extended styling capabilities
- Centralized state management using Pinia
- File based routing
- Type checking with TypeScript throughout development and build processes
- Collection of Vue composition utilities with VueUse
- SVGO support
- JSX syntax support
- SSG support with sitemap for production builds
- Auto-imported layouts
- Auto-imported components, stores, composables and utils
- Testing setup with Playwright and Vitest
- Code quality tools: ESLint, Prettier, Husky, Lint Staged, and Commitlint
- Type checking and running related tests before commit
VSCode + Volar (and disable Vetur) + TypeScript Vue Plugin (Volar).
TypeScript cannot handle type information for .vue
imports by default, so we replace the tsc
CLI with vue-tsc
for type checking. In editors, we need TypeScript Vue Plugin (Volar) to make the TypeScript language service aware of .vue
types.
If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a Take Over Mode that is more performant. You can enable it by the following steps:
- Disable the built-in TypeScript Extension
- Run
Extensions: Show Built-in Extensions
from VSCode's command palette - Find
TypeScript and JavaScript Language Features
, right click and selectDisable (Workspace)
- Run
- Reload the VSCode window by running
Developer: Reload Window
from the command palette.
See Vite Configuration Reference.
npm install
npm run dev
npm run build
Run Unit Tests with Vitest
npm run test:unit
# To watch the tests with the UI
npm run test:unit:watch
Run End-to-End Tests with Playwright
# Install browsers for the first run
npx playwright install
# When testing on CI, must build the project first
npm run build
# Runs the end-to-end tests
npm run test:e2e
# Watch the end-to-end tests with the UI
npm run test:e2e:watch
# Runs the tests only on Chromium
npm run test:e2e -- --project=chromium
# Runs the tests of a specific file
npm run test:e2e -- tests/example.spec.ts
# Runs the tests in debug mode
npm run test:e2e -- --debug
Format with Prettier
npm run format
Lint with ESLint
npm run lint
npm run lf