Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
segevfiner opened this issue Mar 18, 2025 · 0 comments
Open

Comments

@segevfiner
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant