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

Schema for manifest.json lists service_worker as required #8590

Closed
Vinnl opened this issue Oct 31, 2022 · 0 comments · Fixed by #9068
Closed

Schema for manifest.json lists service_worker as required #8590

Vinnl opened this issue Oct 31, 2022 · 0 comments · Fixed by #9068

Comments

@Vinnl
Copy link

Vinnl commented Oct 31, 2022

🐛 bug report

When trying to use @parcel/config-webextension for a ManifestV3 WebExtension for Firefox, adding a background script results in an error: "Missing property service_worker".

However, since Firefox (and Safari too, IIRC) also support Event Pages, it is valid to have a background property without a service_worker.

(And in fact, adding the service_worker property at the time of writing will even cause an error, because SW support hasn't been implemented yet.)

🎛 Configuration (.babelrc, package.json, cli command)

Just trying to run Parcel with

parcel watch manifest.json --host localhost --config @parcel/config-webextension

🤔 Expected Behavior

Parcel should build the extension without errors.

😯 Current Behavior

Parcel complains about background not having a service_worker value.

💁 Possible Solution

Remove service_worker from the following line, or modify it to require either service_worker or scripts:

required: ['service_worker'],

🔦 Context

I'm trying to use Parcel to build an MV3 WebExtension that will support at least both Firefox and Chrome.

🌍 Your Environment

Software Version(s)
Parcel 2.7.0
Node 16.18.0
npm 8.19.2
Operating System Fedora Silverblue 36
@github-actions github-actions bot added the Stale Inactive issues label Apr 30, 2023
@mischnic mischnic removed the Stale Inactive issues label Apr 30, 2023
@parcel-bundler parcel-bundler deleted a comment from github-actions bot Apr 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants