DEV Community

How to test a browser extension locally

Cassidy Williams on February 18, 2024

I built a browser extension this week, and had to do a bit of digging to figure out how to test it properly on Chrome and Edge before publishing it...
Collapse
 
guitarino profile image
Kirill Shestakov • Edited

Nice, seems pretty straightforward. It's a bit of a pain on Firefox. It's not a problem if you're using Firefox Developer Edition or Firefox Nightly, but if you want to use it on a normal Firefox, you have to pack and sign it using their web-ext tool every time you make changes to it, and only then you're allowed to enable it in your browser. It's a bit like having to publish an NPM package just so you can test it (except extension doesn't get published, it just gets checked and signed by Mozilla). It's fine if you intend to publish the extension, because for that you will have to sign up on addons.mozilla.org and set up the 2-factor authentication anyway, but having to do this in case you're just developing an extension for yourself without an intent to publish (as was the case for me) was pretty inconvenient

Collapse
 
cassidoo profile image
Cassidy Williams

I noticed that, which is why I admit I didn't bother 😅 it was such a pain! Thanks for sharing this though.