Skip to content
/ vite-vue Public template

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.

Notifications You must be signed in to change notification settings

gokhantaskan/vite-vue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vite-Vue

CI

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/

Features

  • 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

Recommended IDE Setup

VSCode + Volar (and disable Vetur) + TypeScript Vue Plugin (Volar).

Type Support for .vue Imports in TS

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:

  1. Disable the built-in TypeScript Extension
    1. Run Extensions: Show Built-in Extensions from VSCode's command palette
    2. Find TypeScript and JavaScript Language Features, right click and select Disable (Workspace)
  2. Reload the VSCode window by running Developer: Reload Window from the command palette.

Customize configuration

See Vite Configuration Reference.

Project Setup

npm install

Compile and Hot-Reload for Development

npm run dev

Type-Check, Compile and Minify for Production

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

Format and lint

npm run lf

About

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.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published