This is a template for creating a Chrome extension using React and Vite with TypeScript.
Make sure you have Node.js (version 18+ or 20+) installed on your machine.
-
Clone or fork the repository :
# To clone git clone https://github.com/5tigerjelly/chrome-extension-react-template cd chrome-extension-react-template
-
Install the dependencies:
npm install
To start the development server:
npm run dev
This will start the Vite development server and open your default browser.
To create a production build:
npm run build
This will generate the build files in the build
directory.
- Open Chrome and navigate to
chrome://extensions/
. - Enable "Developer mode" using the toggle switch in the top right corner.
- Click "Load unpacked" and select the
build
directory.
Your React app should now be loaded as a Chrome extension!
public/
: Contains static files and themanifest.json
.src/
: Contains the React app source code.vite.config.ts
: Vite configuration file.tsconfig.json
: TypeScript configuration file.package.json
: Contains the project dependencies and scripts.
This project is licensed under the MIT License.