Closed as duplicate of#58660
Description
Version
v24.2.0
Platform
Subsystem
No response
What steps will reproduce the bug?
-
create two files,
main.js
andmain.ts
, both with the same content:console.log(import.meta.main)
-
run
node main.js
-
run
node main.ts
-
observe that
main.js
printstrue
whilemain.ts
printsfalse
How often does it reproduce? Is there a required condition?
always
What is the expected behavior? Why is that the expected behavior?
node main.ts
behave exactly like node main.js
, and import.meta.main
should behave as it says it should.
What do you see instead?
node main.js
prints true
.
node main.ts
prints false
.
Additional information
Metadata
Metadata
Assignees
Labels
No labels