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

Firefox requires xpi file type for extension code, but doesn't allow it for extension source code #229

Open
bo-carey opened this issue Dec 4, 2024 · 4 comments

Comments

@bo-carey
Copy link

bo-carey commented Dec 4, 2024

When building for firefox, we automatically compress results into a XPI file. This is good for the app code as it is preferred for when submitting the code to firefox.

The problem is that firefox also requires the submission of the source code for extensions that use bundlers. That source code needs to be compressed into any of the following formats: .zip, .tar.gz, .tgz, .tar.bz2

We already provide the ability to zip-source, we should add a way to specify the file type for posterity.

@bo-carey
Copy link
Author

bo-carey commented Dec 5, 2024

If anyone needs a workaround for this, you can zipSource for your chrome build and then just zip without source for firefox. That way you get the source zip in .zip format.

@cezaraugusto
Copy link
Member

hey @bo-carey, not sure I'm following. what is the optimal workflow here in your opinion?

you can compress the final build via --zip flag and the source via --zip-source like pnpm extension build --zip.

@bo-carey
Copy link
Author

bo-carey commented Dec 6, 2024

Pretty much that! I wasn't sure what you might think of the issue. I'd be happy to take this on as a first issue if that's alright.

@cezaraugusto
Copy link
Member

sure! you can use extension build --zip to zip your distribution files and extension build --zip-source to zip the source files. you can also combine both:

# Generates a zip artifact for both production and development
extension build --zip-source --zip

let me know if that's not the case, happy to help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants