This template provides a starting point for creating a Chrome extension using React and TypeScript with Vite.
- Clone the Repository:
git clone https://github.com/Quest-Labs-INC/quest-react-chrome-extension-kit
- Install Dependencies:
cd quest-react-chrome-extension-kit npm install
- Development:
- Start the development server:
npm run dev
- This will launch a development server using Vite, which will automatically reload the extension whenever you make changes to the source code.
- Building:
- To build the extension for production, run:
npm run build
- This command will transpile the TypeScript code to JavaScript and bundle the extension using Vite.
- Testing the Extension:
- Load the extension in Chrome:
- Open Chrome and go to
chrome://extensions/
. - Enable "Developer mode" in the top right corner.
- Click on "Load unpacked" and select the
dist
directory in your project.
- Open Chrome and go to
- Adding Functionality:
- Edit
src/background.ts
to add background script functionality. - Update
src/manifest.json
to add permissions, content scripts, etc., as needed for your extension.
- Packaging:
- To package the extension for distribution, run:
npm run build-extension
- This will create a
dist
directory with the necessary files for your extension.
- Customizing:
- Update the
manifest.json
file in thesrc
directory to customize your extension's name, description, version, etc.
- Publishing:
- To publish your extension to the Chrome Web Store, follow the Chrome Web Store Developer Dashboard instructions.
- Additional Resources:
- For more information on developing Chrome extensions, refer to the Chrome Extension Developer Guide.