A cross-platform (Chrome, Firefox, Edge, Opera, Brave) web browser extension (Manifest V3 and Manifest V2) starter kit with hot reload support, built with React, Typescript, Redux, Vite, ESLint, Prettier, TailwindCSS, Jest and more!
Features Β· Quick Start Β· Important Notes Β· License
π NEW (experimental) Zustand for state management instead Redux, with
webext-zustandpackage. You can try it now on the branchexperimental-zustand
- Instant HMR (hot reload)1
- Write once run on any browser
- Global Redux support with persist option. Effortless communication between content, background, popup, options, and more pages.
- Provides a basic content example and popup, options, and welcome pages with all React
- Latest Manifest V3 support
- Manifest V2 support (beta)
- Dynamic manifest.json
- Includes ESLint configured to work with TypeScript and Prettier
- Includes tests with Jest
- React
- TypeScript
- Redux (toolkit and redux-persist)
- TailwindCSS
- Vite
- Jest
- ESLint
- Prettier
- simple-git-hooks (lightweight husky alternative)
- nano-staged
![]() |
![]() |
![]() |
![]() |
![]() |
|---|---|---|---|---|
| β | β (Beta) | β | β | β |
Ensure you have
Create a repo from this template on GitHub.
or
If you prefer to do it manually with the cleaner git history
Note If you don't have yarn installed, run: npm install -g yarn
npx degit sinanbekar/browser-extension-react-typescript-starter my-web-extension
cd my-web-extension
git initThen run the following:
-
yarn installto install dependencies. -
yarn devto start the development server. -
yarn buildto build an unpacked extension. -
Load extension in Chrome (Chromium, Manifest V3)
- Go to the browser address bar and type
chrome://extensions - Check the
Developer Modebutton to enable it. - Click on the
Load Unpacked Extensionbutton. - Select your
distfolder in the project root.
- Go to the browser address bar and type
-
Load extension in Firefox (Manifest V2)
- Go to the browser address bar and type
about://debugger - Click on the
Load Temporary Add-onbutton. - Select your
dist-firefox-v2folder in the project root.
- Go to the browser address bar and type
yarn cleanto remove dist folder.devandbuildcommands call this command.yarn formatto fix code with eslint and prettier.yarn lintto call ESLint and Prettier.yarn testfor testing.
You can use redux (redux-toolkit) as state manager between popup, background, content and custom pages. Read the documentation for more.
Note This plugin powers the development side of this starter.
docs: https://crxjs.dev/vite-plugin
Special thanks to @jacksteamdev and contributors for this amazing plugin.
This repository is following the Conventional Commits standard.
MIT Β© Sinan Bekar
Footnotes
-
While it is fully supported and stable in most cases, hard reloading is rarely recommended. β©





