This guide explains how to run the Preact + Tailwind CSS starter kit as a browser extension/plugin in Firefox, Chrome, Edge, Tor Browser, and Opera for both development and production modes.
-
Prepare the extension for Firefox:
npm run dev:firefox
This will build the project and create a Firefox-compatible
manifest.jsonin thedist/directory. -
Open Firefox and navigate to
about:debugging#/runtime/this-firefox. -
Click on "Load Temporary Add-on...".
-
Navigate to your project's
dist/directory and select themanifest.jsonfile. -
The extension will be loaded temporarily.
Note: For development in Firefox, temporary add-ons are automatically allowed. If you encounter signing issues, you can:
- Use Firefox Developer Edition or Nightly builds
- Or set
xpinstall.signatures.requiredtofalseinabout:config(not recommended for regular browsing)
Hot Reload: To see changes, you need to rebuild (npm run dev:firefox) and click "Reload" next to your extension in the debugging page.
-
Create the production package:
npm run release:firefox
This creates a production-ready Firefox extension package in the
release/directory aspreact-tailwind-starterkit.firefox.zip. -
Install the extension for testing:
- Open Firefox and navigate to
about:addons. - Click the gear icon and select "Install Add-on From File...".
- Select the
.zipfile from therelease/directory. - Confirm the installation.
- Open Firefox and navigate to
-
For Firefox Add-ons store submission:
- Upload the
.zipfile to Mozilla Add-ons - The file will be automatically signed during the review process.
- Upload the
-
Prepare the extension for Chrome:
npm run dev:chrome
This will build the project and create a Chrome-compatible
manifest.jsonin thedist/directory. -
Open Chrome and navigate to
chrome://extensions/. -
Enable "Developer mode" by toggling the switch in the top right corner.
-
Click on "Load unpacked".
-
Navigate to your project's
dist/directory and select the entire folder. -
The extension will be loaded for development.
Hot Reload: To see changes, rebuild with npm run dev:chrome and click the refresh icon next to your extension in the extensions page.
-
Create the production package:
npm run release:chrome
This creates a production-ready Chrome extension package in the
release/directory aspreact-tailwind-starterkit.chrome.zip. -
Install the extension for testing:
- Open Chrome and navigate to
chrome://extensions/. - Enable "Developer mode".
- Drag and drop the
.zipfile onto the extensions page, or click "Load unpacked" and select the extracted contents.
- Open Chrome and navigate to
-
For Chrome Web Store submission:
- Upload the
.zipfile to the Chrome Web Store Developer Dashboard.
- Upload the
-
Prepare the extension for Edge:
npm run dev:edge
This will build the project and create an Edge-compatible
manifest.jsonin thedist/directory. -
Open Edge and navigate to
edge://extensions/. -
Enable "Developer mode" by toggling the switch in the bottom left corner.
-
Click on "Load unpacked".
-
Navigate to your project's
dist/directory and select the entire folder. -
The extension will be loaded for development.
Hot Reload: To see changes, rebuild with npm run dev:edge and click the refresh icon next to your extension in the extensions page.
-
Create the production package:
npm run release:edge
This creates a production-ready Edge extension package in the
release/directory aspreact-tailwind-starterkit.edge.zip. -
Install the extension for testing:
- Open Edge and navigate to
edge://extensions/. - Enable "Developer mode".
- Drag and drop the
.zipfile onto the extensions page, or click "Load unpacked" and select the extracted contents.
- Open Edge and navigate to
-
For Microsoft Edge Add-ons store submission:
- Upload the
.zipfile to the Microsoft Edge Add-ons Developer Dashboard.
- Upload the
Tor Browser Compatibility: Tor Browser is based on Firefox but has stricter security policies and content security requirements.
-
Prepare the extension for Tor Browser:
npm run dev:tor
This will build the project and create a Tor Browser-compatible
manifest.jsonwith stricter security policies in thedist/directory. -
Open Tor Browser and navigate to
about:debugging#/runtime/this-firefox. -
Click on "Load Temporary Add-on...".
-
Navigate to your project's
dist/directory and select themanifest.jsonfile. -
The extension will be loaded temporarily.
Important Notes for Tor Browser:
- Tor Browser has stricter Content Security Policy (CSP) - no
'unsafe-eval'allowed - Some permissions may be restricted for privacy reasons
- Extensions should not compromise user anonymity
- Test thoroughly as Tor Browser may block certain extension behaviors
Hot Reload: To see changes, rebuild with npm run dev:tor and click "Reload" next to your extension in the debugging page.
-
Create the production package:
npm run release:tor
This creates a Tor Browser-compatible extension package in the
release/directory aspreact-tailwind-starterkit.tor.zip. -
Install the extension for testing:
- Open Tor Browser and navigate to
about:addons. - Click the gear icon and select "Install Add-on From File...".
- Select the
.zipfile from therelease/directory. - Confirm the installation.
- Open Tor Browser and navigate to
-
Distribution:
- Tor Browser users typically install extensions manually
- Consider providing installation instructions for privacy-conscious users
- Extensions should be distributed through secure channels
Opera Compatibility: Opera uses the same Chromium engine as Chrome, so it's 100% compatible with Chrome extensions.
-
Use Chrome setup:
npm run dev:chrome
-
Open Opera and navigate to
opera://extensions/. -
Enable "Developer mode" by toggling the switch in the top right corner.
-
Click on "Load unpacked extension".
-
Navigate to your project's
dist/directory and select the entire folder. -
The extension will be loaded for development.
Hot Reload: Same as Chrome - rebuild with npm run dev:chrome and click the refresh icon.
Use the Chrome package: Opera extensions use the same format as Chrome extensions.
-
Create the package:
npm run release:chrome
-
Distribution options:
- Opera Add-ons: Upload the Chrome
.zipfile to Opera Add-ons - Chrome Web Store: Opera users can install directly from the Chrome Web Store
- Opera Add-ons: Upload the Chrome
Note: Most Opera extension developers publish to the Chrome Web Store since Opera automatically supports Chrome extensions.
- Browser-specific setup: Use
npm run dev:firefox,npm run dev:chrome, ornpm run dev:edgeto prepare your extension for development in each browser. - Manifest generation: The project automatically generates browser-specific
manifest.jsonfiles based on the configurations in theconfig/directory. - Hot reload: After making code changes, you need to rebuild using the appropriate
dev:browsercommand and manually reload the extension in the browser.
- Firefox: Use the Browser Console (
Ctrl+Shift+J) and the extension's debugging page atabout:debugging#/runtime/this-firefox. - Chrome: Use Developer Tools (
F12) and the Extensions page atchrome://extensions/for debugging. - Edge: Use Developer Tools (
F12) and the Extensions page atedge://extensions/for debugging. - Opera: Same as Chrome - use Developer Tools (
F12) and the Extensions page atopera://extensions/for debugging.
- Package creation: Use
npm run release:firefox,npm run release:chrome, ornpm run release:edgeto create store-ready packages. - All browsers: Use
npm run release:allto create packages for all three browsers at once. - Store submission: Submit your extension to each browser's respective extension store:
- Firefox: Mozilla Add-ons
- Chrome: Chrome Web Store Developer Dashboard
- Edge: Microsoft Edge Add-ons
- Opera: Opera Add-ons or Chrome Web Store (recommended)
This extension supports multiple browsers through three main configurations:
Use npm run dev:chrome and npm run release:chrome
- ✅ Google Chrome - Primary target
- ✅ Microsoft Edge - Has dedicated config but Chrome setup also works
- ✅ Opera - Full compatibility with Chrome extensions
- ✅ Brave Browser - Chromium-based, supports Chrome extensions
- ✅ Vivaldi - Chromium-based, supports Chrome extensions
- ✅ Arc Browser - Chromium-based, supports Chrome extensions
- ✅ Kiwi Browser (Android) - Mobile Chromium with extension support
- ✅ Yandex Browser - Chromium-based, supports Chrome extensions
Use npm run dev:firefox and npm run release:firefox
- ✅ Mozilla Firefox - Primary target
- ✅ Firefox Developer Edition - Same as Firefox
- ✅ Firefox Nightly - Same as Firefox
- ✅ Firefox ESR - Same as Firefox
These would need additional configuration files and build scripts:
- ❌ Safari - Uses different extension system (Safari App Extensions/Safari Web Extensions)
- Requires Xcode and different manifest format
- Needs separate development setup
- ❌ Tor Browser - Based on Firefox but has strict security policies
- May require modified permissions and CSP
- ❌ Legacy Internet Explorer - No modern extension support
- ❌ Legacy Edge (EdgeHTML) - Discontinued, replaced by Chromium Edge
- ✅ Kiwi Browser (Android) - Uses Chrome setup
- ✅ Firefox Mobile - Uses Firefox setup (limited extension support)
- ❌ Chrome Mobile - No extension support
- ❌ Safari Mobile - Different extension system
- Always test your extension in all target browsers before releasing.
- Test both development and production builds to ensure compatibility.
- Verify that all features work correctly across different browser versions.
- Chromium-based browsers: Testing in Chrome covers most Chromium-based browsers
- Firefox variants: Testing in Firefox covers Firefox Developer Edition and ESR