Open
Description
Yarn workspaces use node_modules resolution algorithm to allow a mono-repository structure. Mostly all modules are placed on the root level so that they can be resolved by any other package in the monorepo. The currently used approach to determine the secondary entry points leads to an error when used in such a setup, as the node_modules resolving is not using the same resolving mechanism. Mostly an error is thrown that the file could not be found, as it might only exist on a node_modules folder some level up.
I guess this line needs to be considered
It maybe should use require.resolve
to use the same resolving algorithm like node_modules.