A modern, opinionated starter template for building browser extensions using Vite, Vue 3, and Manifest V3. Supports Chrome, Firefox, and more. Includes pre-configured routing, state management, composables, and a rich set of UI components from Nuxt/UI v3.
src/pages or relevant UI directory—auto-registered as a route.webext-bridge for context communication, webextension-polyfill for browser API compatibility.

pnpx degit mubaidr/vite-vue3-browser-extension-v3 my-webext
cd my-webext
pnpm install
pnpm dev
pnpm buildpnpm lintpnpm dev:chrome / pnpm dev:firefoxpnpm build:chrome / pnpm build:firefoxLoad the extension from the dist/chrome or dist/firefox folder in your browser.
const { data: syncSettings, promise } = useBrowserSyncStorage('settings', {
theme: 'dark',
notifications: true,
preferences: { language: 'en', fontSize: 14 }
})
const { data: userProfile } = useBrowserLocalStorage('profile', {
name: 'John Doe',
lastLogin: null,
favorites: ['item1', 'item2']
})
console.log(syncSettings.value.theme) // 'dark'
console.log(userProfile.value.name) // 'John Doe'
.
├── dist/ # Built extension files (chrome/firefox)
├── public/ # Static assets (icons, etc.)
├── scripts/ # Build/dev scripts
├── src/ # Source code
│ ├── assets/ # Global assets
│ ├── background/ # Background scripts
│ ├── components/ # Shared Vue components
│ ├── composables/ # Vue composables (hooks)
│ ├── content-script/ # Content scripts
│ ├── devtools/ # Devtools panel
│ ├── locales/ # i18n files
│ ├── offscreen/ # Offscreen pages
│ ├── stores/ # Pinia stores
│ ├── types/ # TypeScript definitions
│ ├── ui/ # UI pages (popup, options, etc.)
│ └── utils/ # Shared utilities
├── manifest.config.ts # Base manifest config
├── vite.config.ts # Base Vite config
├── tailwind.config.cjs # Tailwind CSS config
└── package.json # Dependencies & scripts
<script setup>)Contributions are welcome! Please open issues or submit pull requests for improvements or new features.
If you find this project useful, please consider supporting the author and starring ⭐ the repository.
|
Muhammad Ubaid Raza |
Dreamliner |
Jihoon Yi |
Diego Ponciano |
igorfz |
hi2code |
Null |