Live data from Hacker News

Show HN: Plasmo – a framework for building modern Chrome extensions

github.com

1–10 of 39 posts

Show HN: Plasmo – a framework for building modern Chrome extensions

#1
Hey HN, we're excited to have people try out our framework! When we built out a Chrome extension earlier this year, we noticed that the config was too imperative. You had to constantly tell Chrome via the manifest.json file where your files were, what your permissions should be, etc.

So we thought it might be interesting to build a more declarative framework. When we built a proof of concept, we enjoyed working with it and decided to invest more time into making it usable and adding more features.

We're still pretty early in building it out, and there's a bunch more we want to add, but this feels like a good time to showcase it and hear what people think!

Show HN: Plasmo – a framework for building modern Chrome extensions
github.com

Re: Show HN: Plasmo – a framework for building modern Chrome extensions

#5

I found making Chrome extensions with Sveltekit was very easy thanks in part to its use of Vite. Any plans to support anything other than React?

It's definitely something we want to consider in the future! Right now, we want to focus on a single view framework and make the developer experience as seamless as possible with it. The framework we've chosen is React because we're most familiar with it.

Re: Show HN: Plasmo – a framework for building modern Chrome extensions

#6
post #3

Looks very promising. I'm wondering about the current state of cross-browser compatibility. How close are we to being able to write MV3 extensions that run on Chrome/Firefox/Safari without code adaptations?

There's standardization work being done at the moment with the W3C WebExtensions Community Group [1] which is definitely a step in the right direction!

Mozilla has also done some great work building a web extension polyfill library that attempts to abstract away the differences between the browsers [2] but the translation will always be imperfect, and edge cases are abundant.

[1]: https://www.w3.org/community/webextensions/

[2]: https://github.com/mozilla/webextension-polyfill

Re: Show HN: Plasmo – a framework for building modern Chrome extensions

#8
post #7

This is neat. How does live-reloading work? Manually reloading a chrome extension with each code change has been a pain point for me in the past.

Thanks! We wrote a custom Parcel runtime [1] inspired by Parcel's HMR runtime (which was too bloated and buggy for us) that injects a web socket listener into the development build of the extension.

Whenever a bundle change happens, Parcel sends it the refresh message and it either does `chrome.runtime.reload()` or `location.reload()` depending on the context.

[1]: https://github.com/PlasmoHQ/plasmo/blob/main/packages/parcel...

Post reply on HN