@leo-millenial/vite-vue-bex
Version:
A modern template for creating Chrome extensions using Vue 3, TypeScript, Vite, and UnoCSS
111 lines (88 loc) β’ 3.06 kB
Markdown
# Vue 3 Chrome Extension Template
[π·πΊ Π ΡΡΡΠΊΠΎΠ΅ ΠΎΠΏΠΈΡΠ°Π½ΠΈΠ΅](./README.ru.md) | πΊπΈ English
A modern template for creating Chrome extensions using Vue 3, TypeScript, Vite, and UnoCSS.
Install template
```bash
npx degit leo-millenial/vite-vue-bex <my-project-name>
```
## π Features
- β‘ **Fast development** with [Vite](https://vitejs.dev/)
- π― **Vue 3** with Composition API and `<script setup>`
- π· **TypeScript** for type safety
- π¨ **UnoCSS** for atomic CSS styling
- πΈ **DaisyUI** for beautiful UI components
- π§ **webext-bridge** for script communication
- π¦ **webextension-polyfill** for cross-browser compatibility
- π§ͺ **Vitest** for testing
- π **Hot Module Replacement** in development mode
## π Project Structure (FSD)
```
src/
βββ app/
β βββ background/ # Background scripts
β βββ index.ts
βββ content/ # Content scripts
β βββ content.ts
βββ pages/
β βββ popup/ # Popup interface
β β βββ index.html
β β βββ index.vue
β β βββ main.ts
β βββ welcome/ # Welcome page
β βββ index.html
β βββ index.vue
β βββ main.ts
βββ shared/ # Shared utilities
β βββ config/
βββ public/
βββ images/ # Extension icons
```
## π Tech Stack
### Core Dependencies
- [Vue 3](https://vuejs.org/) - Progressive JavaScript framework
- [TypeScript](https://www.typescriptlang.org/) - Typed JavaScript
- [Vite](https://vitejs.dev/) - Fast build tool and dev server
- [UnoCSS](https://unocss.dev/) - Atomic CSS engine
- [DaisyUI](https://daisyui.com/) - Tailwind CSS component library
### Extensions & Plugins
- [@crxjs/vite-plugin](https://crxjs.dev/vite-plugin/) - Vite plugin for Chrome extensions
- [@vitejs/plugin-vue](https://github.com/vitejs/vite-plugin-vue) - Vue plugin for Vite
- [webext-bridge](https://github.com/zikaari/webext-bridge) - Extension script communication
- [webextension-polyfill](https://github.com/mozilla/webextension-polyfill) - Cross-browser API
### Development Tools
- [Vitest](https://vitest.dev/) - Fast testing framework
- [@vue/test-utils](https://test-utils.vuejs.org/) - Vue component testing utilities
- [ESLint](https://eslint.org/) - JavaScript/TypeScript linter
- [Prettier](https://prettier.io/) - Code formatter
## π Quick Start
### Using npm
```bash
# Create new project
npm create @leo-millenial/vite-vue-bex my-extension
cd my-extension
# Install dependencies
npm install
# Start development
npm run dev
```
### Using pnpm
```bash
# Create new project
pnpm create @leo-millenial/vite-vue-bex my-extension
cd my-extension
# Install dependencies
pnpm install
# Start development
pnpm run dev
```
### Using yarn
```bash
# Clone the template
npx degit your-username/vue3-chrome-extension-template my-extension
cd my-extension
# Install dependencies
pnpm install
# or
npm install
# or
yarn install