A modern foundation for Chrome extensions with Webpack 5, Tailwind CSS 3, and Manifest V3.
- π Webpack 5 + Babel
- π¨ Tailwind CSS + PostCSS
- π¦ Manifest V3 Ready
- π HTML/JS/CSS Hot Reloading
- β‘ Production Optimization
- π¦ Auto ZIP Packaging
- π Code Formatter with Prettier
- π Automatic changelog generation with Semantic Release
- π Linter with ESLint
Content Script Loaded | Options UI |
---|---|
![]() |
![]() |
Popup UI (Status tab) | Popup UI (Actions tab) |
---|---|
![]() |
![]() |
Options UI in Popup | Options UI in Popup (Saved) |
---|---|
![]() |
![]() |
- Node.js 22+ and npm
- Getting started Run the following command on your local environment:
git clone --depth=1 https://github.com/justintieu/chrome-extension-boilerplate.git
cd chrome-extension-boilerplate
npm install
- Build Project
npm run build
- Load in Chrome
- Go to chrome://extensions
- Enable "Developer mode" (toggle top-right)
- Click "Load unpacked"
- Select the dist folder
βββ README.md # README file
βββ .github # GitHub folder
βββ public/ # Static assets
β βββ *.html # Extension pages
β βββ icons/ # Extension icons
βββ scripts # Scripts folder
βββ src/
β βββ background.js # Service worker
β βββ content.js # Content scripts
β βββ popup.js # Popup UI
β βββ options.js # Settings page
β βββ styles.js # Tailwind CSS
βββ webpack.config.js # Build configuration
βββ tailwind.config.js # Tailwind settings
βββ postcss.config.js # PostCSS plugins
βββ manifest.json # Extension manifest
Command | Description |
---|---|
npm run dev |
Development build with watch mode |
npm run build |
Creates production build |
npm run package |
Create zip from production build |
npm run release |
Runs build and package commands |
npm run prettier |
Format all files |
- Update Manifest
Edit
manifest.json
based on your needs:
{
"name": "Your Extension",
"description": "Custom description",
"version": "1.0.0",
"action": {
"default_popup": "popup.html"
}
}
- Add/Remove Pages
- Create new HTML in
public/
- Add JS entry in
webpack.config.js
- Update manifest permissions
- Modify Styles Edit Tailwind config:
// tailwind.config.js
module.exports = {
theme: {
extend: {
colors: {
primary: "#3b82f6",
},
},
},
};
- Build production files and create ZIP package
npm run release
- Upload
extension.zip
to Chrome Web Store Dashboard
Q: Styles not updating?
- Restart Webpack dev server
- Check Tailwind content config
Q: Extension not loading?
- Reload extension in
chrome://extensions
- Check browser console (Ctrl+Shift+J)
Everyone is welcome to contribute to this project. Feel free to open an issue if you have any questions or find a bug. Totally open to suggestions and improvements.
Licensed under the MIT License, Copyright Β© 2025 See LICENSE for more information.
Found this useful? Please star β the repo!