WXT: Next-Gen Web Extension Framework
wxt.dev
wxt.dev
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.
Does using a bundler count as minification? One that takes all the files in the packages and links them into fewer files.
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
- WXT
- Plasmo: www.plasmo.com
- CRXJS: https://crxjs.dev/vite-plugin
- Web Extension Vite Starter: https://github.com/antfu-collective/vitesse-webext
- Bedframe: https://github.com/nyaggah/bedframe
to name a few. Has anyone used multiple of these? If so, how do they compare? What makes one stand out above the others?
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.
What for? All browsers now have a promised API
> The Firefox folks could really improve the UX here
I wouldn't hold my breath.