Chrome Extension App uses the best web development practices and provides the best DX. It enables developers to quickly develop Chrome extensions app; nowadays, countless ML applications using LLM provide a browser extension app, which was my primary motivation for building this boilerplate project.
- 🗨️ Vite. Dev server, HMR (Hot module replacement), Rollup.
- 🫒 Vue3. Reactive, component-based framework for building web interfaces.
- 🤐 vite-plugin-zip-pack for creating chrome extension compressed zip to upload to Chrome Web Store.
- 🇮🇹 Rome. Linter and Formatting.
- 🥓 crxjs vite plugin. Vite plugin that helps you make Chrome Extensions.
- 👩🎨 Postcss with autoprefixer and tailwindcss plugins
- 🎗️ Typescript support
- 🎹 Github actions running code linter and formatting.
Follow these steps to use this template:
- Fork this repository.
- Clone the fork to your local machine.
- Open the project in VSCode (okay if you prefer another IDE).
- Run
npm install
to set up the dependencies. - Run
npm rum build
, which builds the extension for production. It provides the optimized app code in thedist
folder and a compressed zip file to upload to Chrome Extensions store under theartifacts
folder.
- Open Chrome and then go to Chrome -> Settings -> Extensions. Make sure developer mode is enabled.
- Click
Load unpacked
button and selectdist
folder from the project's root folder.
Check the extension load properly by clicking on the extension icon. You should see the extension popup:
Check content script works by navigating to Gmail. Something like this should be displayed:
npm run dev
then you can change the source code and expect the Chrome extension to reload and update accordingly.
npm run format
runs the formatter, ensuring consistent code style. rome format . --write
under the hood.
npm run lint
. runs checks. npx rome check .
under the hood.
npm run lint:fix
. runs checks and applies safe fixes and formatting. npx rome check . --apply
under the hood.
Project also set up github action that runs the npx rome ci .
when push to main
or release
branch.
Contribute to the project by creating a pull request. Please follow these steps:
- Fork the repository.
- Clone the fork to your local machine.
- Create a new branch from the main branch.
- Make your changes and commit them.
- Push your branch to your fork.
- Create a pull request with a descriptive title and message on this repository. Ensure you run
npm run lint:fix
before creating the pull request because github actions checks it.
Chrome Extension App is licensed under the MIT License.