xstevenyung / vue-specific-version

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WebExtension Vite Starter

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

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
  • ๐Ÿƒ Windi CSS - on-demand CSS utilities
  • ๐Ÿฆพ TypeScript - type safe
  • ๐Ÿ“ฆ Components auto importing
  • ๐ŸŒŸ Icons - Access to icons from any iconset directly
  • ๐ŸŒ WebExtension - isomorphic extension for Chrome, Firefox, and others
  • ๐Ÿ“ƒ Dynamic manifest.json with full type support

Pre-packed

WebExtension Libraries

Vite Plugins

Vue Plugins

UI Frameworks

  • Windi CSS - next generation utility-first CSS framework

Icons

Coding Style

Dev tools

  • TypeScript
  • pnpm - fast, disk space efficient package manager
  • tsup - Zero config TypeScript bundler powered by esbuild
  • esno - TypeScript / ESNext node runtime powered by esbuild
  • npm-run-all - Run multiple npm-scripts in parallel or sequential

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

  • views - frontend for the extension (popup and options).
  • src - background scripts and content scripts.
    • manifest.ts - manifest for the extension.
  • extension - extension package root, also holds assets.
  • scripts - development helper scripts.

Development

pnpm dev

Then load extension in browser with the extension/ folder,

Build

To build the extension, run

pnpm build

And then pack files under extension.

Credits

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

Variations

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

About

License:MIT License


Languages

Language:TypeScript 77.0%Language:Vue 14.2%Language:HTML 4.4%Language:CSS 4.4%