Skip to content

import.meta.filename and import.meta.dirname #50

Closed
@mcollina

Description

@mcollina

One of the most annoying things in the ESM implementation in Node.js is the lack of __filename and __dirname to work with paths from ESM files.

I would recommend we specify import.meta.dirname and import.meta.filename as optional shared metadata, returning the local paths in the filesystem as strings (and not file:// URLs).

For more context: nodejs/node#48740

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions