Skip to content

A template for creating ManifestV2 and Manifestv3 browser extensions using astro

Notifications You must be signed in to change notification settings

latinrev/astro-browser-extension-template

Repository files navigation

Astro browser extension template

A vanilla Astro template with build hot reload to quickstart browser extensions. The template supports both ManifestV2 and ManifestV3

If you want to use any frontend framework (ReactJS, Vue, etc) you can follow AstroJS guides for that

Editing the manifests

To edit the manifests, popup entry point(by default is index.html generated by astro), background scripts, etc. You can do so in the public folder under v2 and v3

Features

  • Hot reload for dist folder
  • Parallel builds for ManifestV2 and ManifestV3
  • Unified UI for ManifestV2 and ManifestV3

Run Locally

Clone the project

  git clone https://github.com/latinrev/astro-browser-extension-template.git

Go to the project directory

  cd astro-browser-extension-template

Install dependencies

  npm install

Start the hot reload

Once the project is up and running you will see your build results inside dist/v2 dist/v3 which then in turn you can point your browsers to these directories

  npm run build:reload

Build options

Hot reload builds for both ManifestV2 and ManifestV#

 npm run build:reload

Builds for both ManifestV2 and ManifestV#

 npm run build

Only builds for ManifestV2

 npm run buildV2

Only builds for ManifestV3

 npm run buildV3

Authors

Easter egg, Hola Midu!

Contributing

Contributions are always welcome!