Preflight Checklist
Problem Description
Once Electron v28 makes it to stable and we see wider adoption of ESM in the main process, we lose require.main.filename and when the Electron app is packaged to is a great way to get the entry script.
Proposed Solution
app.mainStartupScript?
Alternatives Considered
In Node you can just use process.argv[1] but there is no path supplied in the args in packaged Electron apps.
Preflight Checklist
Problem Description
Once Electron v28 makes it to stable and we see wider adoption of ESM in the main process, we lose
require.main.filenameand when the Electron app is packaged to is a great way to get the entry script.Proposed Solution
app.mainStartupScript?Alternatives Considered
In Node you can just use
process.argv[1]but there is no path supplied in the args in packaged Electron apps.