DEV Community

Discussion on: Getting started with Electron and Svelte

Collapse
 
franknoirot profile image
Frank Noirot

This was so helpful, thank you Johannes!

Has anyone gotten the Electron frontend import of electron working in Svelte? I'd like to use ipcRenderer in my Svelte frontend to kick off a Node process in the Electron main script, but I get errors for the 'fs' and 'path' imports that Electron uses whenever I try.

Collapse
 
franknoirot profile image
Frank Noirot

Update: I found this StackOverflow discussion super helpful: stackoverflow.com/a/59888788. The solution isn't anything dependent on Svelte's behavior, but using the preload functionality within Electron.