prmonitor icon indicating copy to clipboard operation
prmonitor copied to clipboard

feat: Support browser-specific manifest generation for Chrome and Firefox

Open sun-yryr opened this issue 3 weeks ago • 1 comments

Summary

Fixes #1066

This PR implements browser-specific manifest generation to support both Chrome and Firefox with Manifest V3:

  • Added manifest template system: Created manifest.template.json with browser-specific keys using the pattern __{browser}__{key} (e.g., __chrome__service_worker, __firefox__scripts)
  • Implemented manifest transformer: Added scripts/transform-manifest.js that processes the template and generates browser-specific manifest files during build
  • Updated npm scripts:
    • Modified webpack config to support browser-specific builds via BROWSER environment variable
    • Added separate build scripts for Chrome and Firefox (build:chrome-mv3, build:firefox-mv3)
    • mv3 means Manifest V3
    • Added build:all script to build both browsers
    • Output directories are now browser-specific (dist-chrome-mv3, dist-firefox-mv3)
  • Updated CI: Modified CI workflow to use build:all instead of build
  • Updated .gitignore: Added /dist-* pattern to ignore all browser-specific dist directories

Testing

Verified that the extension successfully fetches pull request lists on the following browsers:

  • Floorp (12.7.0, Firefox 145.0.1)
  • Arc (1.122.0 (71105), Chromium Engine Version 142.0.7444.176)

Notes

release.yml is not updated yet because I'm not familiar with the extension deployment process to Chrome Web Store and Firefox Add-ons.

After this PR is merged, please update release.yml before releasing the extension.

If helpful, here is a related reference: https://github.com/sun-yryr/prmonitor/commit/89abd46d42e6de8032b884a1101d447a408f04fd

sun-yryr avatar Dec 06 '25 17:12 sun-yryr

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Dec 06 '25 17:12 CLAassistant