I have built a complex single page web app using React (create-react-app PWA). (app, code)
Now I want to reuse/share most of that app to make a VSCode web extension (CustomTextEditorProvider) and potentially a JupyterLab extension).
What would be the best way to share and organize the code? Are there any similar examples of reuse and multi-targeting?
I'm quite new to frontend development (I know nothing about webpack etc).
I understand taht in theory it's possible and maybe even simple.
However in practice it might not be as trivial. If I understand correctly, create-react-app
hides a lot of complexity (hence eject
existence). But VSCode has its own templates and webpack/tool configuration (especially for Web extensions). Probably, JupyterLab has its own extension templates and configurations.
How should I re-organize the repo without minimal disturbance to my SPA so that all three targets live in a single repository (or is it a bad idea?) with shared component code.