Fully featured cross platform browser extension template using Webpack/Babel/React
Please file any issues or feature requests at https://github.com/samueljun/browser-extension-template/issues.
-
Clone this repo and rename for your extension.
-
Install the required node modules:
npm install- Run the following command so that webpack can watch and recompile the
/srcfiles live to the/distfolder:
npm run watchTo run the extension with live reloading in a clean Firefox instance, run the following command in a separate terminal:
npm run watch-firefoxTo temporarily load the extension in a normal Firefox instance:
- Go to
about:debugging - Click
Load Temporary Add-on - Load the
srcfolder
- Go to
chrome://extensions/ - Enable developer mode
- Click
Load unpacked extension... - Load the
/distfolder
Run the following command with the appropriate npm version {patch/minor/major} to bump the package.json version based on semver:
npm version patch && git push && git push --tagsRun the following command so that webpack can recompile the /src files in production mode to the /dist and /dist-zip folder:
npm run build