Updated 2026 — Fully modernized with React 19, Tailwind CSS v4, Vite 6, TypeScript 5.9, and pnpm.
A minimal, production-ready Chrome Extension (Manifest V3) template. Drop a folder, get a content script — zero config.
react-jsx transform (no import React needed)@theme, Vite pluginsrc/manifest.tspnpm install
Edit package.json to set your extension's name, description, and version. These feed into the generated manifest.json. For more control, edit src/manifest.ts.
pnpm dev
Runs both Vite configs in watch mode — the main build (popup, options, onInstalled, service worker) and the content script build. Changes rebuild automatically.
pnpm build
Outputs to dist/. Load it in Chrome: chrome://extensions → Developer mode → Load unpacked → select the dist folder.
src/
├── content-scripts/ # Auto-discovered content scripts
│ └── main/ # Each folder = one content script
│ ├── index.tsx # Entry point (required)
│ ├── App.tsx # Your components
│ └── config.json # { "matches": ["<all_urls>"] }
├── scripts/
│ ├── onInstalled/ # Shown on first install
│ ├── options/ # Extension options page
│ ├── popup/ # Browser action popup
│ └── service-worker/ # Background service worker
├── styles/
│ └── index.css # Tailwind v4 config + imports
├── utils/
│ └── browser.ts # Chrome messaging helpers
├── assets/ # Extension icons
└── manifest.ts # Auto-generates manifest.json
The template includes a Ctrl+Space command to reload the extension during development. Set it up at chrome://extensions/shortcuts.
To disable it for production, remove the commands block from src/manifest.ts and the chrome.commands listener from the service worker.
Content scripts are bundled as IIFE builds. To debug your source .tsx files:
sourcemap: 'inline' in vite.config.content.ts).pnpm dev to build with inline sourcemaps.F12) on any page where the content script runs..tsx files appear there with full breakpoint support.debugger statements directly in your code.For the service worker, go to chrome://extensions → click "Inspect views: service worker".
Content scripts are auto-discovered from src/content-scripts/. Each subfolder with an index.tsx becomes a content script — no config files to edit, no build scripts to update.
mkdir src/content-scripts/github
Create src/content-scripts/github/index.tsx:
console.log('Running on GitHub!')
Optionally add src/content-scripts/github/config.json to control which sites it runs on:
{ "matches": ["https://github.com/*"] }
If no config.json is provided, defaults to <all_urls>.
That's it. Run pnpm build — it's automatically built to dist/js/content-github.js and registered in the manifest.
Tailwind v4 uses CSS-based configuration. Edit src/styles/index.css to add custom colors, fonts, and design tokens under @theme.
ISC
$ claude mcp add react-tailwind-chrome-extension-template \
-- python -m otcore.mcp_server <graph>