chrome-extension-template-preact-vite
chrome-extension-template-preact-vite copied to clipboard
Table of Contents
- Intro
- Features
-
Installation
- Procedures
-
Screenshots
- NewTab
- Popup
- DevTools
- Recommendations
Intro
This template was made with a goal to reduce as much as possible the extension's bundle size, while also having a blazing fast build speed and overall great developer experience with Vite.
The chunk sizes when cloning and building the template:
Features
Installation
Procedures
- Run
npx degit fell-lucas/chrome-ext-template-preact-windi-vite my-project
or clickUse this template
on GitHub. - Change
name
anddescription
in package.json => Auto synchronize with manifest - Run
pnpm i
,yarn
ornpm i
(check your node version >= 16) - Run
pnpm dev
,yarn dev
ornpm run dev
to watch files and rebuild with any changes - Load Extension on Chrome
- Open - Chrome browser
- Access - chrome://extensions
- Check - Developer mode
- Find - Load unpacked extension
- Select -
dist
folder in this project (after dev or build)
- If you want to build without watching, run
pnpm build
,yarn build
ornpm run build
.
Screenshots
New Tab

Popup

Dev Tools

Recommendations
VSCode Extensions
- vscode-eslint
- prettier-vscode
- windicss-intellisense
- vscode-coverage-gutters
- vscode-jest
- vscode-jest-runner
Inspired by
Jonghakseo @ Repo
and Vitesse Webext
License
Distributed under the MIT License.