Confusing electron renderer scoping issue


#1

TLDR; How would you handle this? take data from my webpack bundled app > give to renderer > give to main > save file

I already have everything working except passing the data from my bundled app to the renderer which signals main. I can save test strings using native save dialogue and FS. But i cant get real data out of my app into the renderer file.

hey chums, I’m having some scoping issues I think.
I have a pouchDB / webpack client application which works great. Now I’m wrapping it in electron to get some extra file APIs from node. Here is the renderer , https://ghostbin.com/paste/tsdrw
as you can see on line 10, I’m attempting to access DB with alldocs. This code works inside the bundle. How can I give access to it to the renderer?

I also tried the opposite, where I include the renderer API methods inside the bundle, but again scoping prevented the modules from being found.
I want to in short grab the data in my client bundle.js pouchDB instance, and save it to file using electron API.


#2

I think just removing webpack and dragging my uncompiled app client folder into my electron project could work… trying it now.


#3

Didn’t work! Ha :smiley: