Boilerplate for Custom Chrome Extensions
Easily create Google Chrome Extensions using the
latest
version of React.
The following scenarios/options are supported:
- Popup ✓
- New Tab ✓
- Options ✓
- Background Page ✓
- Content Page ✓
npm install -g generate-chrome-extension
react-chrome
- change directory to your newly created project
- run react app (extensions files) on the browser
npm run start
- build unpacked extension
npm run build
- production build (this zip file can upload to Google WebStore)
npm run pack
- goto:
chrome://extensions
in the browser and enable'developer mode'
- press
Load unpacked
and target the folderbuild/
The project is automatically being watched, any changes to the files will recompile the project.
NOTE: changes to the content page and background page scripts requires you to reload the extension in chrome://extensions
- update version number inside
./src/manifest.json
- run
npm run pack
- upload
extension-build.zip
to the chrome webstore.
This will run a production build and will automatically zip it as an extension package in the root folder named: extension-build.zip
This folder contains the react single app source code. inside it can build page for popup, options, tabs.
see: ./src/
This ./build
folder contains the content page,background page, popup page scripts.
This project is licensed under the MIT license, Copyright (c) 2021 Jithin Antony. For more information see LICENSE.md.