preact-browser-extension-boilerplate
v0.0.2
Published
- **Preact X** (or React if you prefer it) - **Shadow DOM** for injected content - **CSS Modules** - **PostCSS** (preset-env and custom-properties) - Ready-to-go setup with **internationalization**
Downloads
9
Readme
🎉 React (Preact) Browser Extension Boilerplate
- Preact X (or React if you prefer it)
- Shadow DOM for injected content
- CSS Modules
- PostCSS (preset-env and custom-properties)
- Ready-to-go setup with internationalization
This project aims to provide a simple boilerplate for writing browser extensions for the most popular browsers, such as Chrome, Firefox, and Opera.
It's built with preact
and preact-compat
which allows you to switch between react
and preact
.
Content and styles which are injected directly to the page, are isolated inside Shadow DOM. CSS modules are used to avoid class names collision.
Note on Content Security Policy (CSP)
"unsafe-eval" in directive 'script-src' is needed for auto reloading, and should be removed from production manifest.json.