A modern Chrome extension template built with Svelte 5, TypeScript, and Vite.
src/
āāā background/ # Service worker (background script)
ā āāā index.ts
āāā content/ # Content scripts (injected into pages)
ā āāā index.ts
āāā popup/ # Extension popup UI
ā āāā App.svelte
ā āāā index.html
ā āāā main.ts
ā āāā styles.css
āāā options/ # Extension options page
ā āāā App.svelte
ā āāā index.html
ā āāā main.ts
ā āāā styles.css
āāā lib/ # Shared utilities
ā āāā index.ts
ā āāā messaging.ts
ā āāā storage.ts
ā āāā types.ts
āāā icons/ # Extension icons (add your own)
āāā manifest.json # Chrome extension manifest
# Install dependencies
bun install
# Build with watch mode for development
bun run dev
# Build for production
bun run build
# Run Svelte type checker
bun run check
bun run build to build the extensionchrome://extensions/dist folder from this projectCreate icons in the following sizes and place them in src/icons/:
icon16.png (16x16)icon32.png (32x32)icon48.png (48x48)icon128.png (128x128)Edit src/manifest.json to:
Common permissions you might need:
{
"permissions": [
"storage", // Store data
"activeTab", // Access current tab
"tabs", // Full tab access
"notifications" // Show notifications
]
}
MIT