Git Product home page Git Product logo

Comments (15)

phgn0 avatar phgn0 commented on May 31, 2024 4

FYI for anyone looking for a hacky immediate workaround, you can manually patch the @parcel/transformer-webextension module via https://github.com/ds300/patch-package to recognize the new schema. It worked for me in lindylearn/unclutter@3bc830e.

from browser-extension-template.

fregante avatar fregante commented on May 31, 2024 3

The PR has been merged. Try running this in a few hours:

npm install -D parcel@nightly @parcel/config-webextension@nightly

from browser-extension-template.

fregante avatar fregante commented on May 31, 2024 3

Thanks for the ping! I updated parcel, tested it and it works as expected!

Note

This change effectively drops support for Firefox until they support Manifest v3: https://bugzilla.mozilla.org/show_bug.cgi?id=1578284

To enable support manually:

  1. Run npm run build
  2. In the distribution/manifest.json file, revert the same changes you see in #75:
    • set manifest_version to 2
    • move host_permissions items back to permissions
    • restore the previous background key
  3. Save that version just for Firefox

from browser-extension-template.

fregante avatar fregante commented on May 31, 2024 2

Please leave a πŸ‘ on parcel-bundler/parcel#6079 if you're interested

from browser-extension-template.

Andonvr avatar Andonvr commented on May 31, 2024 2

This is still a problem, and apparently the Chrome Web Store has stopped accepting new Manifest V2 extensions. Does this mean we cannot publish extensions that have been written with this template?
image

from browser-extension-template.

tomcollis avatar tomcollis commented on May 31, 2024 1

Thank you, I have liked the issue you suggested.

from browser-extension-template.

fregante avatar fregante commented on May 31, 2024 1

I'll keep this open until I update Parcel here if you don't mind.

from browser-extension-template.

fregante avatar fregante commented on May 31, 2024

Thanks for opening the issue!

The issue is that Parcel does not support the Manifest v3 yet so the only way to use v3 is to use webpack (or to avoid the WebExtension transformer, which would change the template substantially). This is tracked in parcel-bundler/parcel#6079 and there's nothing that can be done in this repo unfortunately.

You have until early 2022 to publish your v2 extension and then Parcel hopefully will update the transformer to support v3 before the "end of life for v2" in 2023.

If it's urgent, your only choice is to use a previous, webpack-based version. This is the last one before moving to Parcel: https://github.com/fregante/browser-extension-template/tree/a0f9cbe27c854e98d52033783a9e951246217dab

πŸ‘† but it's not advised at this point.

from browser-extension-template.

fregante avatar fregante commented on May 31, 2024

Unfortunately correct. There has been a PR on parcel's repo open for a while to add support

from browser-extension-template.

aspiers avatar aspiers commented on May 31, 2024

I see from this comment 3 days ago that apparently all the work is done, and it's just awaiting final review. Does this mean that until it's merged we can in theory just specify a dependency on the GitHub PR branch?

from browser-extension-template.

aspiers avatar aspiers commented on May 31, 2024

Hrm, maybe not, since @parcel/transformer-webextension is a separate package in a workspace subdirectory, and I can't see any obvious way to specify a dependency on a subdirectory of a GitHub branch. I notice that this StackOverflow question seems to ask how to do that, and didn't get any answers in 9 months, so maybe it's just not possible and ds300/patch-package is the best way.

from browser-extension-template.

fregante avatar fregante commented on May 31, 2024

Monorepos are a mess of tangled dependencies so I'd advise against trying to load that separately 😳

Hopefully they're only a few days away from merging…

from browser-extension-template.

aspiers avatar aspiers commented on May 31, 2024

OK thanks for the advice! Yes hopefully indeed, since I'm working on an extension which I'd love to have published in the Chrome Web Store before a conference coming up soon...

from browser-extension-template.

fregante avatar fregante commented on May 31, 2024

You can see the progress in the PR #75

However unfortunately it doesn't work due to:

from browser-extension-template.

aspiers avatar aspiers commented on May 31, 2024

What is left to do on this?

from browser-extension-template.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.