svelte-electron-boilerplate icon indicating copy to clipboard operation
svelte-electron-boilerplate copied to clipboard

Renderer process does not get called

Open GaspardCulis opened this issue 2 years ago • 4 comments

Versions

  • App Version: v1.0.0
  • Node Version: v16.13.2
  • Operating System: Windows 10
  • Browser: Google Chrome v109

Expected Behavior

I just put a console.log in the renderer.ts file, and nothing gets logged, from what I understood, it's supposed to get called by public/index.html. I ran it with npm run dev and npm run dev:electron in the electron window

I also tried to call process.exit(0); , didn't do anything.

The preload script gets called. Didn't touched any files Im not "supposed"to.

GaspardCulis avatar Feb 09 '23 18:02 GaspardCulis

Hi! Try add <script src="renderer.js"></script> in public/index.html before </head>

ptkdev avatar Feb 10 '23 17:02 ptkdev

I did as you said (last child inside of <head>), chrome fails to load resource both in dev and dev:electron. Maybe you could add an example on how to make backend interact with frontend and vice versa in this amazing template.

image

image

GaspardCulis avatar Feb 11 '23 16:02 GaspardCulis

At moment i work at version 3.0 with sveltekit + electron forge. I try investigate why process does not get called in v2.0, stay tuned.

ptkdev avatar Feb 11 '23 16:02 ptkdev

That sounds cool ! When do you think V3.0 will be released ?

GaspardCulis avatar Feb 11 '23 16:02 GaspardCulis