react-browser-extension icon indicating copy to clipboard operation
react-browser-extension copied to clipboard

Remaining TODOs

Open abstractalgo opened this issue 3 years ago • 5 comments

Moving this from the README into an issue.


(also to allow TS to load files outside root scope)

(record a video walkthrough)

communication between background, popup and content scripts. typescript everywhere (@types/chrome).

(recipes: monorepo. shared lib.)

caveats: assets.


todo

  • [ ] working example extension
  • [ ] shared folders (+monorepo)
  • browsers
    • [x] chromium (v3 manifest)
    • [ ] firefox (v3 manifest ~~v2~~, see #2)
    • [ ] safari (?)
  • dev tools
    • [ ] dev pipeline (watcher, hot reload, incremental builds, sim tabs env)
  • logic
    • [ ] cross-context communication
      • [ ] storage
        • [ ] options / config
        • [ ] per tab
        • [ ] shared
        • [ ] synced
      • [ ] static assets

abstractalgo avatar Jan 10 '22 11:01 abstractalgo

What needs done here to help with the dev pipeline aspect?

joshsmith avatar Aug 19 '22 19:08 joshsmith

I was mostly thinking about if there's a way to automate hot-reload in the browser and somehow see all the logs in the same place and make them easily reachable.

Currently, working on any of the React apps as regular React apps is totally fine, you should have no problems with that. But testing the entire project as a browser extension, by manually having to reload the extension, opening "Inspect views" etc is just quite tedious. I still don't have concrete ideas on how to achieve many of these, but it is something to consider.

abstractalgo avatar Aug 19 '22 20:08 abstractalgo

The basic ideas behind web-ext-webpack-plugin could be adapted outside webpack.

joshsmith avatar Aug 21 '22 23:08 joshsmith

See the Extension Workshop reference to webext:

You can use web-ext to automatically install and update your extension while making coding changes.

Repurposing the webpack code into a different build process seems fairly straightforward.

joshsmith avatar Aug 21 '22 23:08 joshsmith

Thanks for sharing these!

I haven't spent too much time with these as, as far as I know, web-ext is Firefox-only. And this repo is aimed at manifest v3 which is still not supported by Firefox, so due to those mismatches, I didn't dig deep.

However, web-ext-webpack-plugin seems to mention Chromium capabilities as well, which is curious.

If you would like to spend some time with it and try to fit it into this repo's setup, that'd be amazing! Otherwise, I'll give it a shot, but can't guarantee when will that happen. Cheers!

abstractalgo avatar Aug 22 '22 01:08 abstractalgo