-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
Add __dirname and __filename on ES Modules #30771
Copy link
Copy link
Closed
Labels
duplicateIssues and PRs that are duplicates of other issues or PRs.Issues and PRs that are duplicates of other issues or PRs.esmIssues and PRs related to the ECMAScript Modules implementation.Issues and PRs related to the ECMAScript Modules implementation.feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.
Metadata
Metadata
Assignees
Labels
duplicateIssues and PRs that are duplicates of other issues or PRs.Issues and PRs that are duplicates of other issues or PRs.esmIssues and PRs related to the ECMAScript Modules implementation.Issues and PRs related to the ECMAScript Modules implementation.feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.
Is your feature request related to a problem? Please describe.
It's a feature request.
Describe the solution you'd like
Would be nice to add __dirname, and __filename. to ES Modules, I've read the docs, but also read TC39 proposal, they don't decline using this variables.
Describe alternatives you've considered
I have no idea. By the way, I've added
__filenameand__dirnameproperties toimport.metainstead of suggestion of how to get these values.