Open EliteMasterEric opened 3 years ago
CC @TamarCurry has been experiencing issues related to this.
Is there any reason you can't use the template feature? Copy ElectronSetup.hx
into your project, make the changes you need, and then tell Lime to use your copy:
<template path="my/copy/of/ElectronSetup.hx" rename="haxe/ElectronSetup.hx" />
(Disclaimer: I don't know if the destination path is correct. Check your Export/electron folder to figure out where it really goes.)
Using templates to replace a file might be a solution. However, ElectronSetup.hx already checks compiler values for things like allowHighDPI
and stencilBuffer
when it sets up the array for windows in lines 12 through 36, so I figure it could at least support compiler values for things like contextIsolation
and other properties for the webPreferences properties as well. A comprehensive list of the webPreferences properties can be found here.
Is there any reason you can't use the template feature?
This is a very interesting feature. Does this allow you to essentially hotpatch any of your project's dependencies?
I'll look into using it as a fix for my particular use case.
As it stands, the configuration for the ElectronBrowserWindow created by lime in
ElectronSetup
cannot provide certain additional parameters needed by the user.Notably, additional
webPreferences
cannot be overridden, meaning that options likecontextIsolation: false
cannot be provided without modifying lime.https://github.com/haxelime/lime/blob/c743fe10c404fb73003e24100f319a472cb4203f/templates/electron/haxe/ElectronSetup.hx#L54
An option to provide this, either by a command line option or by a project config, would be useful.