electron/remote

Using @electron/remote w/ Angular

petef19 opened this issue · 1 comments

Hello,

we're on Electron 12.x and looking to switch over from using remote via ngx-electron to the new @electron/remote.

As per the docs. in main.js:

require('@electron/remote/main').initialize()

then try to require the fs module in the renderer (Angular) via:

const _fs = require('@electron/remote').require('fs');

but Angular throws this error:

Error: ./node_modules/electron/index.js
Module not found: Error: Can't resolve 'fs' in '...\node_modules\electron'

which breaks the Ng build... how to circumvent this ?

Thanks.

take a look at a demo from another project