Running browser extensions through minifiers is pretty representative of the absurdity of the NodeJS/NPM cargo cult.
No one who's writing an open source browser extension should be using minification, and no one who's installing a browser extension should be installing one that's closed source. Previously:
> Most people aren't (or at least feel they aren't) able to take a hardline stance about only using free software, but if there's one area of your digital life you should be able to apply it to, it's browser extensions.
Buult a small extension recently, and spent a while trying crxjs and some various rollup plugins and other options.
It was taking a long long time, and I didn't have many dependencies I needed. So I just wrote the code by hand, unbundled. Using esm wasn't too too hard, but you have to use dynamic imports & a chrome specific getURL. https://stackoverflow.com/a/53033388
For those who have worked a lot with web extensions, I’m curious to hear what their experiences are with frameworks. There are quite a few that I’ve come across:
I decided to try this recently on my first browser extension and so far the experience has been good.
Sometimes the websocket connection for the hot reload dies but apart from that I've been quite impressed.
Just abstracting away the different manifest files and using the webextension polyfill is all I need and it works.
The only shame is how abysmal the experience is in Firefox I find myself preferring to debug the extension in Chrome as getting to the debugger in Firefox is such a pain. And I use Firefox as my primary browser so it's not because of a Chrome bias I say this. The Firefox folks could really improve the UX here.
No one who's writing an open source browser extension should be using minification, and no one who's installing a browser extension should be installing one that's closed source. Previously:
> Most people aren't (or at least feel they aren't) able to take a hardline stance about only using free software, but if there's one area of your digital life you should be able to apply it to, it's browser extensions.
<https://news.ycombinator.com/item?id=41998764>