Electron: update to latest version 18
-lib hxnodejs is no longer included in the compilation of ApplicationMain (but it is still included for compilation of ElectronSetup, of course). hxnodejs was removed from ApplicationMain because it forces some require() calls to be included in the generated .js, which would require disabling certain Electron security features to work properly in newer versions of Electron than we targeted previously. Electron's documentation recommends not to do that. To use Node.js APIs, you need to run them in more secure contexts, while communicating over IPC with a "preload script" from the "renderer" process. In Lime/OpenFL, this would require a custom ElectronSetup template override, but that shouldn't be all that surprising. See: https://www.electronjs.org/docs/latest/tutorial/process-model for more details on the Electron side.
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
--next
|
||||
-js ::OUTPUT_FILE::
|
||||
-cp ::OUTPUT_DIR::/haxe
|
||||
-lib hxnodejs
|
||||
-main ApplicationMain ::HAXE_FLAGS::
|
||||
|
||||
-D electron
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
--next
|
||||
-js ::OUTPUT_FILE::
|
||||
-cp ::OUTPUT_DIR::/haxe
|
||||
-lib hxnodejs
|
||||
-main ApplicationMain ::HAXE_FLAGS::
|
||||
|
||||
-D electron
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
--next
|
||||
-js ::OUTPUT_FILE::
|
||||
-cp ::OUTPUT_DIR::/haxe
|
||||
-lib hxnodejs
|
||||
-main ApplicationMain ::HAXE_FLAGS::
|
||||
|
||||
-D electron
|
||||
|
||||
@@ -6,6 +6,6 @@
|
||||
"start": "electron ElectronSetup.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"electron": "^9.1.0"
|
||||
"electron": "^18.0.4"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user