Skip to content

[Feature Request]: Add means to get the main process entry script when using ESM #39986

@timfish

Description

@timfish

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions