Skip to content

Use import.meta.url in EXPORT_ES6 mode #7137

Closed
@curiousdannii

Description

@curiousdannii

Follow on to #5368. When in EXPORT_ES6 mode import.meta.url should be used. In browsers document.currentScript will probably still work, but __dirname will not work in Node. import.meta.url is supported in both, and it's cleaner and safer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions