Skip to content

Build Firefox extension

Bepp includes a functionality to package extensions for the firefox Browser using Firefox extensions with Manifest V3. This feature streamlines the process, allowing developers to extend their Chrome extensions to firefox with ease. Additionally, compatibility with Manifest V2 is also supported.

Prerequisites

Usage

bash
bepp build-firefox [options]
js
/**
 * Build Firefox extension.
 * 
 * @see https://bepp.pigeonposse.com/
 * @see https://bepp.pigeonposse.com/guide/lib/build/firefox
 */

import {firefox, buildBrowser} from '@bepp/bepp'

firefox.build({
    /** options **/
})

// Alternative:
buildBrowser('firefox',{
    /** options **/
})

Options

id

Identification for build. Used in filename build. The id option allows you to provide an identification string for the build. This identifier is used in the filename during the build process.

  • CLI option: --id
  • JS key: id
  • Type: string
  • Default: bepp

output

Specify the output directory where the packaged extension will be stored.

  • CLI option: -o --output
  • JS key: output
  • Type: string
  • Default: build/extensions

compress

Compression format for packaging Choose the compression format for packaging the extension.

  • CLI option: -c --compress
  • JS key: compress
  • Type: tar tgz gzip zip
  • Default: tgz

filename

Define the template for the filename of the packaged extension.

Filename placeholders

The filename can include placeholders such:

  • version takes the version number of the extension manifest.
  • id takes the id set by the id option.
  • browser takes the browser's identification name.
  • CLI option: -f --filename
  • JS key: filename
  • Type: string
  • Default: {{id}}-{{browser}}-{{version}}

verbose

Use verbose output.

  • CLI option: -v --verbose
  • JS key: verbose
  • Type: boolean

time

Print execution time.

  • CLI option: -t --time
  • JS key: time
  • Type: boolean

exit

Force exit from process on error.

  • CLI option: -e --exit
  • JS key: exit
  • Type: boolean