mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-07-17 16:37:43 +00:00
fix(electron): explicitly disable sandbox for preload script compatibility
The preload script uses require() for local modules which is not supported in Electron's sandboxed preload environment (default since Electron 20). This only affects Electron's preload API restrictions, not Chromium's OS-level process sandbox which remains active.
This commit is contained in:
parent
4b6bb88523
commit
815341d5e8
1 changed files with 4 additions and 0 deletions
|
|
@ -124,6 +124,10 @@ export const createWindow = async ({
|
|||
webSecurity: false,
|
||||
preload: path.join(__dirname, 'preload.js'),
|
||||
nodeIntegration: false,
|
||||
// Required: preload.js uses require() for local modules (e.g. ./shared-with-frontend/ipc-events.const).
|
||||
// Electron 20+ defaults sandbox to true, and sandboxed preloads can only require built-in Electron
|
||||
// modules. This does NOT disable Chromium's OS-level process sandbox (that's --no-sandbox).
|
||||
sandbox: false,
|
||||
// make remote module work with those two settings
|
||||
contextIsolation: true,
|
||||
// Additional settings for better Linux/Wayland compatibility
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue