Opinionated Vite + Vue Starter Template
Mocking up web app with Vitesse(speed)
Note: This template is created during the early transition of Vue 3 and Vite. At this moment, if you are seeking for better Vue developer experience and more consistent maintenance, we recommend using Nuxt instead (it also works perfectly with SPA or SSG as needed). This template still serves as a reference, but expect slower updates.
English | 简体中文
UnoCSS - the instant on-demand atomic CSS engine
Use the new <script setup> syntax
APIs auto importing - use Composition API and others directly
Static-site generation (SSG) via vite-ssg
Critical CSS via beasties
TypeScript, of course
⚙️ Unit Testing with Vitest, E2E Testing with Cypress on GitHub Actions
☁️ Deploy on Netlify, zero-config
unplugin-vue-router - file system based routingvite-plugin-vue-layouts - layouts for pagesunplugin-vue-components - components auto importunplugin-auto-import - Directly use Vue Composition API and others without importingunplugin-vue-macros - Explore and extend more macros and syntax sugar to Vue.vite-plugin-pwa - PWAunplugin-vue-markdown - Markdown as components / components in Markdown@shikijs/markdown-it - Shiki for syntax highlightingunplugin-vue-i18n - unplugin for Vue I18nvite-ssg-sitemap - Sitemap generator@unhead/vue v2 - manipulate document head reactivelyvite-plugin-vue-devtools - Designed to enhance the Vue developer experience.<script setup> SFC syntaxvite-ssg - Static-site generation<script setup> IDE supportAs this template is strongly opinionated, the following provides a curated list for community-maintained variations with different preferences and feature sets. Check them out as well. PR to add yours is also welcome!
SolidStart, includes UnoCSS.Vitesse requires Node >=14.18
Create a repo from this template on GitHub.
If you prefer to do it manually with the cleaner git history
npx degit antfu-collective/vitesse my-vitesse-app
cd my-vitesse-app
pnpm i # If you don't have pnpm installed, run: npm install -g pnpmWhen you use this template, try follow the checklist to update your info properly
LICENSEApp.vuevite.config.tspublic.github folder which contains the funding infoAnd, enjoy :)
Just run and visit http://localhost:3333
pnpm devTo build the App, run
pnpm buildAnd you will see the generated file in dist that ready to be served.
Go to Netlify and select your clone, OK along the way, and your App will be live in a minute.
First, build the vitesse image by opening the terminal in the project's root directory.
docker buildx build . -t vitesse:latestRun the image and specify port mapping with the -p flag.
docker run --rm -it -p 8080:80 vitesse:latestI have created several Vite apps recently. Setting the configs up is kinda the bottleneck for me to make the ideas simply come true within a very short time.
So I made this starter template for myself to create apps more easily, along with some good practices that I have learned from making those apps. It's strongly opinionated, but feel free to tweak it or even maintain your own forks. (see community maintained variation forks)
can not run dev cmd, when vitesse in pnpm workspace
Propose Bun as an install variant
Module install order
How to solve the console preload crossorigin warning problem
Language preferences are not preserved
Running in subdirectory giving page not found.
Format the contents of "<route lang='yaml'></route>" on save
carbon icon integration with VS Code
Unable to build Vitesse Project using vite-ssg
Vite-Plugin-Preview broken