This repository includes examples of how to set up a Chrome Extension with React and TypeScript.
This project uses Vite and crxjs to build the extension.
git clone git@github.com:yosevu/react-content-script.gityarnyarn build
- Navigate to chrome://extensions/
- Turn on the "Developer mode" toggle switch in the top right of the window
- Click the "Load unpacked" button in top left of the window
- Go to the
react-content-scriptdirectory and select thedistdirectory to load the extension - Navigate to https://blank.org/ to see the Content Script React app
- Go to extensions and click "React TypeScript Chrome Extension" to see the Popup React app
The popup source code is at the root directory.
The content script source code is in the content-script directory.
This repository was originally part of How to inject a React app into a Chrome Extension as a Content Script.
