0.0.2 • Published 5 years ago

preact-browser-extension-boilerplate v0.0.2

Weekly downloads
4
License
MIT
Repository
github
Last release
5 years ago

🎉 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.

Example

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.

Useful links