The boilerplate is to quickly create a chrome extension using ReactJs, The motivation behind creating a boilerplate was:
-
Instead of chrome's ready-made popup, We wanted our own page injected into DOM as a sidebar for better UX.
-
We wanted to use ReactJs for the Component-based approach, Routing, and its build mechanism.
-
We need to make sure that the extension CSS should not conflict with the host page styles in any case.
- Used ReactJs to write chrome extension
- Injecting extension to host page as content script
- Utilized the Chrome messaging API
- Isolated extension CSS using Iframe
- Make sure you have latest NodeJs version installed
- Run
yarn install
ornpm install
for installing the packages - After installing run
yarn watch
ornpm run watch
while developing for hot realoading, It will create a build folder which has to be loaded into the browser from load unpacked - Use
yarn start
ornpm run start
to run the app in the browser
- If you want to build your app use yarn build or npm run build which will create an optimized build into build folder