Skip to content

Correctly handle require.main === module #53

@qpwo

Description

@qpwo

If I import a function from one script into another then require.main === module is true in both so they both fully run. This is different behavior from node and ts-node.

evanw/esbuild#2121

https://github.com/qpwo/esbuild-issue-2121

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions