Files
lime/templates/electron/hxml/final.hxml
Josh Tynjala da3705ed20 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.
2022-04-14 12:08:58 -07:00

25 lines
305 B
Plaintext

--each
--next
-js ::OUTPUT_FILE::
-cp ::OUTPUT_DIR::/haxe
-main ApplicationMain ::HAXE_FLAGS::
-D electron
-D html5
-D html
--next
-js ::OUTPUT_DIR::/bin/ElectronSetup.js
-cp ::OUTPUT_DIR::/haxe
-main ElectronSetup
-lib hxnodejs
-dce full
-D electron
-D html5
-D html
-D final
-D js-flatten
-dce full