{"id":13659977,"url":"https://github.com/neo-hack/webext-template","last_synced_at":"2025-03-29T18:43:34.813Z","repository":{"id":44651297,"uuid":"410224584","full_name":"neo-hack/webext-template","owner":"neo-hack","description":"a fork version of vitesse-webext, but with react","archived":false,"fork":false,"pushed_at":"2023-04-14T12:28:02.000Z","size":92,"stargazers_count":17,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"v3","last_synced_at":"2025-03-14T12:19:37.704Z","etag":null,"topics":["extension","react","vite"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/neo-hack.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"github":"JiangWeixian"}},"created_at":"2021-09-25T09:01:41.000Z","updated_at":"2024-05-15T09:04:20.000Z","dependencies_parsed_at":"2024-04-09T18:55:33.661Z","dependency_job_id":"8c998c1d-093c-49d7-8965-d640e2666487","html_url":"https://github.com/neo-hack/webext-template","commit_stats":null,"previous_names":[],"tags_count":6,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neo-hack%2Fwebext-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neo-hack%2Fwebext-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neo-hack%2Fwebext-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neo-hack%2Fwebext-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neo-hack","download_url":"https://codeload.github.com/neo-hack/webext-template/tar.gz/refs/heads/v3","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246122240,"owners_count":20726822,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["extension","react","vite"],"created_at":"2024-08-02T05:01:14.498Z","updated_at":"2025-03-29T18:43:34.793Z","avatar_url":"https://github.com/neo-hack.png","language":"TypeScript","readme":"# @aiou/webext-template\n*a fork version of [vitesse-webext](https://github.com/antfu/vitesse-webext), but with react*\n\n*thanks to awesome work https://github.com/xlzy520/vitesse-webext/tree/refactor/mv3 support chrome manifest v3*\n\nA [Vite](https://vitejs.dev/) powered WebExtension ([Chrome](https://developer.chrome.com/docs/extensions/reference/), [FireFox](https://addons.mozilla.org/en-US/developers/), etc.) starter template.\n\n[![npm](https://img.shields.io/npm/v/@aiou/webext-template)](https://github.com/neo-hack/webext-template) [![GitHub](https://img.shields.io/github/license/neo-hack/webext-template)](https://github.com/neo-hack/webext-template) [![stackblitz](https://img.shields.io/badge/%E2%9A%A1%EF%B8%8Fstackblitz-online-blue)](https://github.com/neo-hack/webext-template)\n\n[Edit on StackBlitz ⚡️](https://stackblitz.com/github/JiangWeixian/templates/tree/master/packages/webext-template)\n\n## Features\n\n- ⚡️ **Instant HMR** - use **Vite** on dev (no more refresh!)\n- 🌐 React\n- 💬 Effortless communications - powered by [`webext-bridge`](https://github.com/antfu/webext-bridge)\n- 🍃 [tailwindcss](https://tailwindcss.come/) - on-demand CSS utilities\n- 🦾 [TypeScript](https://www.typescriptlang.org/) - type safe\n- 🖥 Content Script - Use React even in content script\n- 🌍 WebExtension - isomorphic extension for Chrome, Firefox, and others\n- 📃 Dynamic `manifest.json` with full type support\n\n## Pre-packed\n\n### WebExtension Libraries\n\n- [`webextension-polyfill`](https://github.com/mozilla/webextension-polyfill) - WebExtension browser API Polyfill with types\n- [`webext-bridge`](https://github.com/antfu/webext-bridge) - effortlessly communication between contexts\n\n### Dev tools\n\n- [TypeScript](https://www.typescriptlang.org/)\n- [pnpm](https://pnpm.js.org/) - fast, disk space efficient package manager\n- [esno](https://github.com/antfu/esno) - TypeScript / ESNext node runtime powered by esbuild\n- [npm-run-all](https://github.com/mysticatea/npm-run-all) - Run multiple npm-scripts in parallel or sequential\n- [web-ext](https://github.com/mozilla/web-ext) - Streamlined experience for developing web extensions\n\n## Usage\n\n### Folders\n\n- `src` - main source.\n  - `contentScript` - scripts and components to be injected as `content_script`\n  - `background` - scripts for background.\n  - `components` - auto-imported React components that shared in popup and options page.\n  - `styles` - styles shared in popup and options page\n  - `manifest.ts` - manifest for the extension.\n- `extension` - extension package root.\n  - `assets` - static assets.\n  - `dist` - built files, also serve stub entry for Vite on development.\n- `scripts` - development and bundling helper scripts.\n\n### Development\n\n```bash\npnpm dev\n```\n\nThen **load extension in browser with the `extension/` folder**.\n\nFor Firefox developers, you can run the following command instead:\n\n```bash\npnpm start:firefox\n```\n\n`web-ext` auto reload the extension when `extension/` files changed.\n\n\u003e While Vite handles HMR automatically in the most of the case, [Extensions Reloader](https://chrome.google.com/webstore/detail/fimgfedafeadlieiabdeeaodndnlbhid) is still recommanded for cleaner hard reloading.\n\n### Build\n\nTo build the extension, run\n\n```bash\npnpm build\n```\n\nAnd then pack files under `extension`, you can upload `extension.crx` or `extension.xpi` to appropriate extension store.\n\n# \n\u003cdiv align='right'\u003e\n\n*built with ❤️ by [😼](https://github.com/neo-hack/templates)*\n\n\u003c/div\u003e\n","funding_links":["https://github.com/sponsors/JiangWeixian"],"categories":["TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneo-hack%2Fwebext-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneo-hack%2Fwebext-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneo-hack%2Fwebext-template/lists"}