Skip to content

[Docs]: Upload Files documentation should document the __dirname alternative for ESM modules #38284

@sarod

Description

@sarod

Page(s)

https://playwright.dev/docs/next/input#upload-files

Description

The examples in the Upload Files sections use __dirname which exists only when using cjs modules.
When using ESM it should be replaced by import.meta.dirname.
See https://nodejs.org/api/esm.html#no-__filename-or-__dirname

The doc should either mention this or use relative paths.

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