Skip to content

Does not work when main script is ES module #49

@coreyfarrell

Description

@coreyfarrell

node script.mjs results in require.main being undefined. I'm addressing this within the next version of tap at tapjs/libtap#21. A bit ugly but I'm using process.argv[1] as long as we're not in REPL and we're not evaluating with any form of node -p or node -e.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions