paranext / paranext-core

Electron client, extension host, and C# library for Paranext
https://paranext.github.io/paranext-core/
MIT License
16 stars 2 forks source link

Investigate cra-craco-electron #15

Closed tjcouch-sil closed 1 year ago

tjcouch-sil commented 1 year ago

Investigate https://github.com/sillsdev/cra-craco-electron to determine if we want to restart our app on it.

irahopkinson commented 1 year ago

Our repo with ERB already builds for the web. After npm run build (or more specifically npm run build:renderer), open /release/app/dist/renderer/index.html in a browser.

We would need to make some minor adjustments to exclude electron references but if we end up not using electron IPC then we probably don't need to do anything.

irahopkinson commented 1 year ago

If we need to develop exclusively on the web we can just add a script in package.json like "start:web": "cross-env NODE_ENV=development TS_NODE_TRANSPILE_ONLY=true webpack serve --config ./.erb/configs/webpack.config.web.dev.ts", and then create the .erb/configs/webpack.config.web.dev.ts file (we could eject a CRA boilerplate and adapt the webpack config from that).

However, developing React inside electron should cover just about every scenario. Once we have a feature working in electron we can then just run /release/app/dist/renderer/index.html with the appropriate backend to check its working the same.