maximegris / angular-electron

Ultra-fast bootstrapping with Angular and Electron :speedboat:
https://www.maximegris.fr/angular-electron/
MIT License
5.67k stars 1.37k forks source link

Loading preload scripts #773

Open leonard-vlaicu opened 1 year ago

leonard-vlaicu commented 1 year ago

Hello.

I'd like to use this package together with your boilerplate, but it requires me to run some preload scripts.

I tried setting up a path to a preload file in webPreferences, but I get an error "Unable to load preload script".

egimataOptimad commented 1 year ago

You cannot set preloading scripts without modifying a few files and also contextIsolation. This package is by default without preloading and you can directly access node in the renderer process. But if you need to use preload script, you can follow this issue here. This guy already configured some stuff for us and it works great. Cheers