Skip to content

Get the path/id to import another entry point from an imported file #4116

@segevfiner

Description

@segevfiner

In order to fully implement esbuild-plugin-pino and support entry points that are placed in subdirectories in the entryPoints option, the plugin needs to retrieve the path/id to resolve one entry point from a file that is imported from an arbitrary entry point, it needs this to pass this path on for starting a worker with it.

But there doesn't seem to be a way to do so in the current plugin API, unless I'm missing some trick. This will be very helpful, as the current implementation of the plugin resorted to using the working directory or absolute paths, which is not the right way to do this that will always work (Breaks if the code is later moved, or if the working directory is not set right, something code shouldn't really depend on).

Any ideas on how to achieve this or extending esbuild with support for this would be helpful.

See wd-David/esbuild-plugin-pino#161

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions