v-extension
v-extension copied to clipboard
A modern Vue 3, Tailwind and Vite Chrome extension starter
Modernized Chrome Extension Vite Starter
A Vite Powered
Modernized Chrome Extension Manifest V3(Chrome) Starter Template.
| Page Type | Light Mode | Dark Mode |
|---|---|---|
| Popup Page | ![]() |
![]() |
| Options Page | ![]() |
![]() |
Features
- β‘οΈ Instant HMR - use Vite on dev (no more refresh!)
- π₯ Vue 3 - Composition API,
<script setup>syntax and more! - π¬ Effortless communications - powered by
webext-bridgeand VueUse storage - π§ Vue Router support - Navigation to pages
- π Tailwind CSS - on-demand CSS utilities
- π¦Ύ TypeScript - type safe
- π¦ Components auto importing
- π Icons - Access to icons from any iconset directly
- π Dark Mode - support toggle dark mode
- π Dynamic
manifest.jsonwith full type support
Pre-packed
WebExtension Libraries
webextension-polyfill-ts- WebExtension browser API Polyfill with typeswebext-bridge- effortlessly communication between contexts
Vite Plugins
vite-plugin-components- components auto import
Vue Plugins
vue-global-api- use Vue Composition API globally- VueUse - collection of useful composition APIs
UI Frameworks
- Tailwind CSS - A utility-first CSS framework for rapid UI development.
Icons
- Iconify - use icons from any icon sets πIcΓ΄nes
vite-plugin-icons- icons as Vue components
Coding Style
- Use Composition API with
<script setup>SFC syntax - ESLint with @antfu/eslint-config, single quotes, no semi
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 xiaoluoboding/chrome-ext-mv3-starter my-extension
cd my-extension
pnpm i
Usage
Folders
src- background scripts and content scripts & frontend for the extension (popup and options).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 is a template derived from antfu/vitesse-webext and xiaoluoboding/chrome-ext-mv3-starter
License
MIT - @xiaoluoboding



