Hacker News new | ask | show | jobs
by leodriesch 1483 days ago
Currently using Parcel with its support for manifest.json as an entrypoint[0], could you explain what your framework does beyond that?

[0]: https://parceljs.org/recipes/web-extension/

1 comments

We use Parcel under the hood and are huge fans! Our framework has opinionated abstractions on top of it that we think help improve the extension development experience considerably.

Features we've built so far:

- manifest.json is generated automatically. If you want to create a content script, you name a file content.ts, and it'll auto-gen the right manifest key-value pair for it. Same with backround.ts. [1]

- Mounting a React component to the popup or options page is similar. You create a popup.tsx or options.tsx file, export a default React component, and it'll automatically associate it in the manifest and mount the component automatically for you.

- We support environment variables with .env files [2]

- We just released support to automatically inject a shadow DOM into a webpage and mount a React component from a content script [3]

- We have remote code bundling that automatically fetches URL based imports (like Google Analytics) in build time to mitigate issues with MV3 not allowing remote code [4]

[1]: https://docs.plasmo.com/#where-is-the-manifestjson-file

[2]: https://docs.plasmo.com/workflows/env

[3]: https://github.com/PlasmoHQ/examples/tree/57791e70549441e391...

[4]: https://docs.plasmo.com/workflows/remote-code