Package your extension

During development, your extension will consist of a directory containing a manifest.json file and the other files the extension needs—scripts, icons, HTML documents, and so on. You need to zip these into a single file for uploading to AMO.

Packaged extensions in Firefox are called "XPI files", which are ZIP files with a different extension.
You don't have to use the XPI extension when uploading to AMO.

The most convenient way to package your extension is to use web-ext build. This tool automatically excludes files that are commonly unwanted in packages, such as .git files. Otherwise, follow the instructions below for your operating system.

Tip: The ZIP file must be a ZIP of the extension's files themselves, not of the directory containing them.

Tip: Verify that the ZIP file is formatted correctly, for example by loading the file at about:debugging in Firefox.

Windows

  1. Open the directory containing your extension's files.

  2. Select files and directories needed to implement your extension, exclude those files that aren't needed to run the extension, such as .git, graphic sources, and similar files.

  3. Open the shortcut menu and click Send to then Compressed (zipped) folder.

Creating package windows image

macOS

  1. Open the directory containing your extension's files.

  2. Select files and directories needed to implement your extension, excludes those files that aren't needed to run the extension, such as .git, graphic sources, and similar files.

  3. Open the shortcut menu and click Compress n Items.

Creating package Mac image

Linux / macOS Terminal

  1. Open Terminal.

  2. Open the directory containing your extension's files, using the command
    cd path/to/my-extension/.

  3. ZIP the content of the directory—remembering to excludes those files that aren't needed to run the extension, such as .git, graphic sources, and similar files—using the command zip -r -FS ../my-extension.zip * --exclude '*.git*'.

See the documentation for the zip command for more information.