Voltar ao ranking

antfu-collective/vitesse-webext

TypeScript

⚡️ WebExtension Vite Starter Template

webextensionvitevue3
Crescimento de estrelas
Estrelas
3.4k
Forks
250
Crescimento semanal
Issues
24
1k2k3k
jul. de 2021mar. de 2023nov. de 2024jul. de 2026
Artefatosnpmnpm install vitesse-webext
README

WebExtension Vite Starter

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

Popup

Options Page

Inject Vue App into the Content Script

Features

  • ⚡️ 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
  • 🌈 UnoCSS - The instant on-demand Atomic CSS engine.
  • 🦾 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

Pre-packed

WebExtension Libraries

Vite Plugins

Vue Plugins

  • VueUse - collection of useful composition APIs

UI Frameworks

  • UnoCSS - the instant on-demand Atomic CSS engine

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

Usage

Folders

  • 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.

Development

pnpm dev

Then load extension in browser with the extension/ folder.

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

pnpm dev-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 recommended for cleaner hard reloading.

Using Gitpod

If you have a web browser, you can get a fully pre-configured development environment with one click:

Open in Gitpod

Build

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.

Credits

Volta

This template is originally made for the volta.net browser extension.

Variations

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

Repositórios relacionados
bitwarden/clients

Bitwarden client apps (web, browser extension, desktop, and cli).

TypeScriptnpmOtherwebextensionjavascript
bitwarden.com
13.4k1.9k
crimx/ext-saladict

🥗 All-in-one professional pop-up dictionary and page translator which supports multiple search modes, page translations, new word notebook and PDF selection searching.

TypeScriptnpmMIT Licensechromeextension
saladict.crimx.com
13.2k843
floccusaddon/floccus

:cloud: Sync your bookmarks privately across browsers and devices

JavaScriptnpmMozilla Public License 2.0owncloudnextcloud
floccus.org
8.3k313
tridactyl/tridactyl

A Vim-like interface for Firefox, inspired by Vimperator/Pentadactyl.

TypeScriptnpmOtherhacktoberfestfirefox
tridactyl.xyz
6.3k432
FilipePS/Traduzir-paginas-web

Translate your page in real time using Google, Bing or Yandex

JavaScriptnpmMozilla Public License 2.0translatetranslation
addons.mozilla.org/firefox/addon/traduzir-paginas-web/
5.9k729
extension-js/extension.js

The cross-browser extension framework.

TypeScriptnpmMIT Licensewebextensionbrowser-extension
extension.js.org
5k131
scriptscat/scriptcat

ScriptCat, a browser extension that can execute userscript; 脚本猫,一个可以执行用户脚本的浏览器扩展

TypeScriptnpmGNU General Public License v3.0userscriptchrome-extension
docs.scriptcat.org
4.9k367
Authenticator-Extension/Authenticator

Authenticator generates 2-Step Verification codes in your browser.

TypeScriptnpmMIT Licenseauthenticator2fa
authenticator.cc
4.6k1.1k
gdh1995/vimium-c

A keyboard shortcut browser extension for keyboard-based navigation and tab operations with an advanced omnibar

TypeScriptnpmOtherkeyboard-shortcutchrome-extension
chrome.google.com/webstore/detail/vimium-c/hfjbmagddngcpeloejdejnfgbamkjaeg
4.5k315
code-charity/youtube

YouTube / Video Browser-Extension. [Top1 FOSS.] Enrich your experience & choice! 🧰Smart features📌set & forget📌350+ tweaks. Longest-standing. Join🧩us?👨‍👩‍👧‍👧 ⋮ {playback|discovery|extra player buttons|quality|codec|full tab|full screen|no distraction|shorts}

JavaScriptnpmOtherextensionchrome-extension
improvedtube.com
4.5k965
libredirect/browser_extension

A browser extension that redirects popular sites to alternative privacy friendly frontends

JavaScriptnpmGNU General Public License v3.0firefox-extensionprivacy
libredirect.manerakai.com
4k144
EFForg/privacybadger

Privacy Badger is a browser extension that automatically learns to block hidden trackers

JavaScriptnpmOtherprivacyjavascript
privacybadger.org
3.8k431