Skip to content
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

FR: Support for "exports" in package.json #82

Open
pyhedgehog opened this issue Oct 2, 2023 · 1 comment
Open

FR: Support for "exports" in package.json #82

pyhedgehog opened this issue Oct 2, 2023 · 1 comment

Comments

@pyhedgehog
Copy link

pyhedgehog commented Oct 2, 2023

Right now if (saltcorn) plugin requires (directly or indirectly), for example require("@saltcorn/db-common/internal") it raises Error: Cannot find ./internal in plugin @saltcorn/db-common, but in node code outsize live-plugin-manager's vm it works.

Docs: https://nodejs.org/api/all.html#all_packages_subpath-exports
Example: https://github.com/saltcorn/saltcorn/blob/11742abda9d6145c19d2081d492b9c1231ad61c1/packages/db-common/package.json#L14
Reference implementation: https://github.com/nodejs/node/blob/952cf0d17ae51c644a434684dabf493ccf2ebf38/lib/internal/modules/esm/resolve.js#L567

@davideicardi
Copy link
Owner

I can confirm that for now it is not supported. If someone want to work on this, PRs are welcome ;-) !

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

No branches or pull requests

2 participants