This is a template for building a Google Chrome extension using React and Tailwind CSS. The project is structured to streamline development and facilitate easy setup and deployment.
Before starting, ensure that you've replaced the following placeholders with your project's information:
src/static/manifest.json
: Update the extension's metadata, including name, description, version, and permissions.src/static/icon.png
: Replace with your own extension icon.webpack.common.js
: Replace in getHtmlPlugin
with you project name.package.json
: Modify the project name, version, author, and other relevant details.Clone the repository and navigate to the project directory:
git clone https://github.com/JuanPabloGil/google-chrome-extension-react-tailwind-template.git
cd google-chrome-extension-react-tailwind-template
This project supports running in a DevContainer for a consistent development environment.
.devcontainer
directory with the necessary configuration files, you will see a popup at the bottom right corner of the screen.Ctrl+Shift+P
to open the command palette.Dev Containers: Reopen in Container
and select the option from the list.Once the container is running, you can proceed with development as usual by following the Development instructions above.
Install the dependencies:
npm install
To start the development server, run:
npm start
This will start a local development server with live reloading enabled. You can view the changes in real-time as you develop your extension.
To create a production build, run:
npm run build
This will generate the optimized files in the /dist
directory, ready to be uploaded as a Chrome extension.
After building your extension, you'll find the files in the /dist
directory. To deploy:
chrome://extensions/
./dist
directory.Your extension should now be loaded and ready to use in Chrome.