Packaging

Extensions are packaged as signed zip files with the file extension "crx" (for example, myextension.crx). Each extension has its own unique key pair. The public key is used as the unique identifier for the extension. The private key is kept private and used to sign each version of the extension.

Creating a package

To package an extension:

  1. Close all your Chrome windows
  2. Execute Chrome, using the --pack-extension option to specify the path to the extension's folder:
    chrome.exe --pack-extension=ext-folder-path

The packager creates two files: a .crx file, which is the actual extension that can be installed, and a .pem file, which contains the private key.

Do not lose the private key! Keep the .pem file secret and in a safe place. You'll need it later if you want to do any of the following:

If the extension is successfully packaged, you'll see a dialog like this that tells you where to find the .crx and .pem files:

Finding the path to Chrome

If chrome.exe isn't already in your path, you need to specify the complete path to it. Here's how:

Updating a package

To create an updated version of your extension:

  1. Increase the version number in manifest.json.
  2. Close all your Chrome windows.
  3. Execute Chrome, using the --pack-extension and --pack-extension-key options. The value of the key option should be the path to the already generated .pem file for this extension.
    chrome.exe --pack-extension=ext-folder-path --pack-extension-key=ext-key-path

If the updated extension is successfully packaged, you'll see a dialog like this:

Tips and Tricks