Skip to content

🖥️ Web Extension starter kit built with React, TypeScript, TailwindCSS, Storybook, Jest, EsLint, Prettier, and Vite. Supports Google Chrome + Mozilla Firefox + Brave Browser + Microsoft Edge 🔥

License

Notifications You must be signed in to change notification settings

Blocktheory/react-typescript-web-extension-starter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub stars GitHub watchers GitHub forks MIT License PR's Welcome HitCount

React TypeScript Web Extension Starter

🖥️ A Web Extension starter kit built with React, TypeScript, Storybook, EsLint, Prettier, Jest, TailwindCSS, & Vite. Compatible with Google Chrome, Mozilla Firefox, Brave, and Microsoft Edge.

Example Extension Popup

Getting Started

Run the following commands to install dependencies and start developing

yarn install
yarn dev
  • yarn dev - run vite
  • yarn storybook - runs the Storybook server
  • yarn build - builds the production-ready unpacked extension
  • yarn test -u - runs Jest + updates test snapshots
  • yarn lint - runs EsLint
  • yarn prettify - runs Prettier
Loading the extension in Google Chrome

In Google Chrome, open up chrome://extensions in a new tab. Make sure the Developer Mode checkbox in the upper-right corner is turned on. Click Load unpacked and select the dist directory in this repository - your extension should now be loaded.

Installed Extension in Google Chrome

Loading the extension in Brave

In Brave, open up brave://extensions in a new tab. Make sure the Developer Mode checkbox in the upper-right corner is turned on. Click Load unpacked and select the dist directory in this repository - your extension should now be loaded.

Installed Extension in Brave

Loading the extension in Mozilla Firefox

In Mozilla Firefox, open up the about:debugging page in a new tab. Click the This Firefox link in the sidebar. One the This Firefox page, click the Load Temporary Add-on... button and select the manfiest.json from the dist directory in this repository - your extension should now be loaded.

Installed Extension in Mozilla Firefox

Loading the extension in Microsoft Edge

In Microsoft Edge, open up edge://extensions in a new tab. Make sure the Developer Mode checkbox in the lower-left corner is turned on. Click Load unpacked and select the dist directory in this repository - your extension should now be loaded.

Installed Extension in Microsoft Edge

Notes

  • This project is a repository template - click the Use this template button to use this starter codebase for your next project.

  • Includes ESLint configured to work with TypeScript and Prettier.

  • Recommended to use Visual Studio Code with the Format on Save setting turned on.

  • Example icons courtesy of Heroicons.

  • Microsoft Edge is not currently supported.

  • Includes Storybook configured to work with React + TypeScript. Note that it maintains its own vite.config.js and tsconfig.json files. See example story in src/components/hello/__tests__/hello.stories.tsx

  • Includes a custom mock for the webextension-polyfill package in src/__mocks__. This allows you to mock any browser APIs used by your extension so you can develop your components inside Storybook.

Built with

Misc. References

About

🖥️ Web Extension starter kit built with React, TypeScript, TailwindCSS, Storybook, Jest, EsLint, Prettier, and Vite. Supports Google Chrome + Mozilla Firefox + Brave Browser + Microsoft Edge 🔥

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 67.7%
  • JavaScript 23.6%
  • CSS 5.8%
  • HTML 2.9%