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

Use Manifest v3 #75

Merged
merged 5 commits into from
Apr 26, 2022
Merged

Use Manifest v3 #75

merged 5 commits into from
Apr 26, 2022

Conversation

fregante
Copy link
Owner

@fregante fregante commented Apr 14, 2022

This drops support for Firefox 🤷‍♂️

@fregante
Copy link
Owner Author

@fregante fregante mentioned this pull request Apr 14, 2022
@notlmn notlmn closed this Apr 15, 2022
@notlmn notlmn reopened this Apr 15, 2022
@notlmn
Copy link
Collaborator

notlmn commented Apr 15, 2022

My bad, bad mouse clicks.

This drops support for Firefox 🤷‍♂️

Is there a tool out there that does manifest v2 generation from a manifest v3 configuration? That should still help with having two deployments to different stores.

@fregante
Copy link
Owner Author

Not that I know of. Currently it's impossible to use this template for Chrome so it's best to make the switch regardless of Firefox support (which is a small percentage of users)

@Stvad
Copy link

Stvad commented Apr 16, 2022

Firefox user here 😛 . It'd make me sad to see FF support dropped leaving me with no options for starting new extensions 🙁. I think having 2 manifests and 2 separate build commands that use those as entry points can be an option?

what @notlmn mentions (generating one version from another, or generating both versions from a common template) would be ideal, but just having 2 manifests should be an easy option to start with?

@fregante
Copy link
Owner Author

Indeed you can do that after using the template, but here it would mean duplicating every build command and the manifest itself, it's a mess. I assume Firefox is only a couple of months away from allowing MV3

@Stvad
Copy link

Stvad commented Apr 16, 2022

Aren't templates meant to make life with messes easier? 😅

@Stvad
Copy link

Stvad commented Apr 16, 2022

Also, I think not all commands, but just the build one?

@fregante
Copy link
Owner Author

Aren't templates meant to make life with messes easier? 😅

True, but you're assuming that what you're suggesting is easier, which it isn't. For a starter, parcel only works if the file is named exactly manifest.json. So if we have:

  • source/manifest.json
  • source/manifest-firefox.json

The second run gets:

❯ nr build
✨ Built in 550ms

distribution/manifest-firefox.js    734 B    106ms

So what's the alternative?

  • Moving manifest for Firefox in another directory? Then its paths will all need to be updated too (assuming that works without pain)
  • Duplicating the whole source folder? That'd be a terrible template.

At this point, if Firefox support is paramount, then I suggest going with a Webpack-based build like https://github.com/aeksco/react-typescript-web-extension-starter

@101arrowz
Copy link

We've fixed browser_specific_settings upstream, FF support should now still be possible from the same manifest. Unfortunately web_accessible_resources aren't completely fixed yet but basic functionality should still work.

@Stvad
Copy link

Stvad commented Apr 18, 2022

@fregante will experiment with different folders for manifest approach which seems like it can be ok and let you know how it goes!

@fregante
Copy link
Owner Author

fregante commented Apr 19, 2022

@101arrowz thank you for the comment! From my understanding the latest version is broken for content scripts?

FF support should now still be possible from the same manifest.

FF completely fails to load MV3 extensions, this is not a Parcel issue unfortunately; browser_specific_settings was a relatively minor issue

@fregante fregante merged commit 48cd47a into main Apr 26, 2022
@fregante fregante deleted the mv3 branch April 26, 2022 00:21
@Stvad
Copy link

Stvad commented May 7, 2022

@fregante double-folder approach works btw, see manifest and package.json changes in transclude-me/extension@78b529e

@Stvad
Copy link

Stvad commented May 9, 2022

I'm hitting a weird bug with bundling though. It does not seem to be related to the double folder approach, but started happenign to me after 2.5 upgrade: parcel-bundler/parcel#8071

@aspiers
Copy link

aspiers commented May 12, 2022

@fregante double-folder approach works btw, see manifest and package.json changes in transclude-me/extension@78b529e

This commit appears to mix adding the double-folder approach together with a bunch of changes specific to your extension - right? Any chance you could summarise just the generic double-folder changes needed?

@Stvad
Copy link

Stvad commented May 12, 2022

That’s correct. Summary is:

@fregante
Copy link
Owner Author

Please continue in #78

Repository owner locked as resolved and limited conversation to collaborators May 12, 2022
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.

Manifest v3
5 participants