Skip to content

Add import.meta.dirname / import.meta.filename (available since node 20.11.0) #92

@0xdevalias

Description

@0xdevalias

We can see more about when import.meta was introduced here:

We can confirm that in the node docs, seeing that only import.meta.url / import.meta.resolve are available in node 19.x:

But from node 20.x+, import.meta.dirname / import.meta.filename are also available:

Originally posted by @0xdevalias in jehna/humanify#343 (comment)

See also:

Tangentially related:

BCD has compat info for most if not all of the features you describe. See the compat tables on these pages:

We are working on a mechanism to better group features in collaboration with the web-platform-dx/feature-set project. Hopefully, there will be a group for all things modules soon.

Originally posted by @Elchi3 in mdn/browser-compat-data#4819 (comment)

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