electron-userland / electron-userland/electron-webpack

Feature request: support for an additional preload entry point

Open
#122 4 comments 5 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
902
Forks
168
PR merge metrics
No merged PRs in 30d

Description

When using the recommended security settings where browser windows are created with the option

```
new BrowserWindow({
webPreferences: {
nodeIntegration: false
}
});
```
but you still need access to some specific node APIs, the standard approach is to use a separate entry point that is specified as a 'preload' script before the main renderer entry point runs. This runs with full node integration available, and is able to store functions into global scope that can be used by the main renderer script after it starts.

It would be useful if this script could also be processed via webpack (and typescript if the relevant module is installed), in addition to the main and renderer scripts.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.