Thanks for the confirmation Ian. FYI I’m using Electron 20.0.2, which I know the docs are not written for.
Electron React Boilerplate
I am trying to use Electron React Boilerplate which is not based on create-react-app, so the official Realm instructions don’t help much. According to the ERB instructions for adding dependencies I believe Realm should be added to the deeper package.json file in release/app (which should take care of the ‘externals’ concept the the realm docs refer to). But Realm remains undefined in my renderer process. even after running npm install at both levels so something’s going wrong and I’m not sure what.
Create React App
For comparison I’ve now tried again using create-react-app, as the Realm docs describe, and I’m able to get Roam loaded from the renderer process successfully when running in dev mode.
However, when packaging it I ran into this problem with the mongodb-realm dir being created in the wrong place and so now I need to figure out how to solve that with the newer Electron version, because the solution described there I think relies on electron.remote which is not advised any more - but I haven’t tried yet to figure that out.