Vitesse Webext Save

⚡️ WebExtension Vite Starter Template

Project README

WebExtension Vite Starter

A Vite powered WebExtension (Chrome, FireFox, etc.) starter template.


Options Page

Inject Vue App into the Content Script


  • ⚡️ Instant HMR - use Vite on dev (no more refresh!)
  • ? Vue 3 - Composition API, <script setup> syntax and more!
  • ? Effortless communications - powered by webext-bridge and VueUse storage
  • ? Windi CSS - on-demand CSS utilities
  • ? TypeScript - type safe
  • ? Components auto importing
  • ? Icons - Access to icons from any iconset directly
  • ? Content Script - Use Vue even in content script
  • ? WebExtension - isomorphic extension for Chrome, Firefox, and others
  • ? Dynamic manifest.json with full type support


WebExtension Libraries

Vite Plugins

Vue Plugins

  • VueUse - collection of useful composition APIs

UI Frameworks

  • Windi CSS - next generation utility-first CSS framework

Coding Style

Dev tools

  • TypeScript
  • pnpm - fast, disk space efficient package manager
  • esno - TypeScript / ESNext node runtime powered by esbuild
  • npm-run-all - Run multiple npm-scripts in parallel or sequential
  • web-ext - Streamlined experience for developing web extensions

Use the Template

GitHub Template

Create a repo from this template on GitHub.

Clone to local

If you prefer to do it manually with the cleaner git history

If you don't have pnpm installed, run: npm install -g pnpm

npx degit antfu/vitesse-webext my-webext
cd my-webext
pnpm i



  • src - main source.
    • contentScript - scripts and components to be injected as content_script
    • background - scripts for background.
    • components - auto-imported Vue components that are shared in popup and options page.
    • styles - styles shared in popup and options page
    • assets - assets used in Vue components
    • manifest.ts - manifest for the extension.
  • extension - extension package root.
    • assets - static assets (mainly for manifest.json).
    • dist - built files, also serve stub entry for Vite on development.
  • scripts - development and bundling helper scripts.


pnpm dev

Then load extension in browser with the extension/ folder.

For Firefox developers, you can run the following command instead:

pnpm start:firefox

web-ext auto reload the extension when extension/ files changed.

While Vite handles HMR automatically in the most of the case, Extensions Reloader is still recommanded for cleaner hard reloading.


To build the extension, run

pnpm build

And then pack files under extension, you can upload extension.crx or extension.xpi to appropriate extension store.


This template is originally made for the browser extension.


This is a variant of Vitesse, check out the full variations list.

Open Source Agenda is not affiliated with "Vitesse Webext" Project. README Source: antfu/vitesse-webext
Open Issues
Last Commit
1 month ago

Open Source Agenda Badge

Open Source Agenda Rating