Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Make extension using Manifest V3 compatible with Firefox #1388

Merged
merged 12 commits into from
Jul 11, 2024

Conversation

bee344
Copy link
Member

@bee344 bee344 commented Jul 8, 2024

This PR's goal is to make the extension compatible with Firefox, while still being compatible with the new Manifest V3 introduced on #1367 .

Changes

  • Now there are two manifests: manifest_firefox.json and manifest_chrome.json, with each containing the configuration for each browser. There's also a dummy manifest.json which contents are modified depending on what's the target build. This is set like this to avoid the risk of getting an error in the build after modifying the name of the file and getting stuck. This way if the build is cut short, the only thing that changes is the content of the dummy manifest.
  • The target .zip files names were updated to reflect the new targets: master-<TARGET_BROWSER>-build.zip and master-<TARGET_BROWSER>-src.zip.
  • The build and build:zip were updated to run the specific build scripts that were added for each target, in order to not break the CI, but now we can also build just the assets specific for the target browser we want or for both.
  • Updated README.md

@bee344 bee344 changed the title fix: Make extension using Manifest V3 compatible with Firefox fix: Make extension using Manifest V3 compatible with Firefox [WIP] Jul 8, 2024
@bee344 bee344 changed the title fix: Make extension using Manifest V3 compatible with Firefox [WIP] fix: Make extension using Manifest V3 compatible with Firefox Jul 11, 2024
Copy link
Member

@TarikGul TarikGul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GH_RELEASE_FILES in CI needs to be updated :)

@bee344 bee344 merged commit 1b8dcb6 into master Jul 11, 2024
3 checks passed
@bee344 bee344 deleted the anp-manifest-v3-firefox branch July 11, 2024 22:33
@ryanleecode
Copy link
Contributor

running yarn build updates the packages/extension/manifest.json to "service_worker": "background.js",

@ryanleecode
Copy link
Contributor

Ah nvm thats intended

@TarikGul
Copy link
Member

yea yarn build is mainly intended for the CI, for browser specific builds run yarn build:ff or yarn build:chrome

@polkadot-js-bot
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@polkadot-js polkadot-js locked as resolved and limited conversation to collaborators Jul 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants