Build the app for release
Preparation
Do these before building for release the extension
Change the extension version
Go to the public/manifest-common.json
file. Replace the version
value with the proper version of the extension
Replace the extension id
Go to the public/manifest-common.json
file and find the browser_specific_settings
attribute, replace all the id with a unique string. The string should be at most 60 character long.
Currently the ID is set to extensionname@example.org
. Best approach is to combine the extension name with a unique email
The id can be normal string like this "id": "extensionname@example.org"
.
or it can be UUID like this "id": "{daf44bf7-a45e-4450-979c-91cf07434c3d}"
.
Notice that if you use a uuid it should be wrapped with curly braces {}
.
If you don't want to release the extension for firefox for android, you may want to remove the gecko_android
entry.
Run addons linter [optional]
Before building the code for final release, run a developer build and run a linter to verify that there is no error. If there is any error from the linter there is a good chance that firefox extension workshop and chrome webstore will decline the extension
For manifest v2
To run the linter at first build a dev version of manifest v2 by running this command
npm run webpack-dev-v2
When the build finishes, run the linter for manifest v2 by running this command
npm run lint-manifest-v2
If there is no errors, then you'll be fine. Currently the code only has 9 warnings because of the packages bootstrap and jquery package.
For manifest v3
To run the linter at first build a dev version of manifest v3 by running this command
npm run webpack-dev
When the build finishes, run the linter for manifest v3 by running this command
npm run lint-manifest-v3
If there is no errors, then you'll be fine. Currently the code only has 10 warnings because of the packages bootstrap and jquery package.
Build for release for manifest-v2 or firefox
First build the application with webpack production config using this command
npm run webpack-build-v2
Then package the build with web-ext using this command
npm run build
Now go to the dist/manifest-v2/web-ext-artifacts
folder, there should be a zip file. You can upload this zip file to mozilla workshop to release your extension
Build for release for manifest-v3 for chrome and chromium
First build the application with webpack production configuration using this command
npm run webpack-build
The distributable code should be in the dist/manifest-v3
.
To upload the extension you need to zip it. To zip the folder run this command
npm run zip-manifest-v3
Now go to the dist
folder. There should be a zip manifest-v3-bundled.zip
. You can upload this zip file to chrome extension market to release your extension