Electron Packages

You can yarn install and use Electron specific packages in your main thread and preload script. Take a look at the link and choose wisely if you need to. Make sure these are installed into dependencies and NOT devDependencies in your package.json file.