Closed ghost closed 7 years ago
You'll have to do something like this:
https://github.com/electron-userland/electron-forge/wiki/Using-'preload'-scripts
(That should really be in the electron-compile README.)
Ah, I must have missed that. Thanks 👍
@malept I agree - at least adding a link in the README could help some users.
When creating a
BrowserWindow
one may enable awebPreferences.preload
script. This script is loaded before the window is created and has various uses (see linked documentation).Unfortunately since this preload script isn't caught by
electron-compile
, and doesn't end up being cached with the rest of the app's source.Is there a correct way to use a preload script with
electron-compile
?