Skip to content

bug(node:24): import meta main dont work #58660

Description

@PandaWorker

Version

v24.2.0

Platform

Darwin Panda.local 23.6.0 Darwin Kernel Version 23.6.0: Mon Jul 29 21:14:30 PDT 2024; root:xnu-10063.141.2~1/RELEASE_ARM64_T6000 arm64

Subsystem

No response

What steps will reproduce the bug?

// main.ts
console.log(import.meta.main); // false

// main.js
console.log(import.meta.main); // true

How often does it reproduce? Is there a required condition?

The problem appears when running - .ts files

What is the expected behavior? Why is that the expected behavior?

true
Ts and js files should have the same behavior.

What do you see instead?

false

Additional information

When running, import.meta.main does not work inside ts files

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-bugIssues and PRs for confirmed bugs.esmIssues and PRs related to the ECMAScript Modules implementation.strip-typesIssues and PRs related to TypeScript type stripping.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions