A zip file with the contents of the extension, which can be uploaded to the Chrome Web Store and addons.mozilla.org, can be created by following these instructions. (make sure to install Go before building the extension, as it is needed during the build).
The last section explains how to build the extension automatically when you change the source code.
Run make release
to build the extension for all the available channels and
browsers. You can also run make {target}
where {target}
is one of the
following: release_chromium_stable
, release_chromium_beta
,
release_gecko_stable
.
Run make clean_releases
to clean all the release files (this removes the out
folder, which is where the release files are saved).
Take a look at Makefile
, you'll find other targets for make which do other
interesting things (like clean
, for instance).
If you're developing the extension, you might want to load it into your browser
without having to constantly build it manually after each change. In order to
do that, you can run make serve_chromium_mv3
or make serve_gecko
depending
on the type of continuous build you want.
This will run webpack with watch mode and continuously serve a fresh version of
the compiled extension at dist/{BROWSER}
, where {BROWSER}
depends on the
target you selected for make. You can load this folder in Chrome by going to
chrome://extensions
and selecting "Load unpacked".
Keep in mind that while the extension is continuously built, it is not automatically being loaded into Chrome. You'll have to reload the extension manually in Chrome (but at least you won't have to both build and reload it).