Open pyhedgehog opened 1 year ago
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.
require("@saltcorn/db-common/internal")
Error: Cannot find ./internal in plugin @saltcorn/db-common
live-plugin-manager
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
I can confirm that for now it is not supported. If someone want to work on this, PRs are welcome ;-) !
Right now if (saltcorn) plugin requires (directly or indirectly), for example
require("@saltcorn/db-common/internal")
it raisesError: Cannot find ./internal in plugin @saltcorn/db-common
, but in node code outsizelive-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