The setup that worked for me in a Turbo monorepo was to install as a dependency "@your-package":"*"
in package.json
of your main workspace
Then in your tsconfig.json
of your main workspace, add :
{..., // the rest of your tsconfig.json file
"paths": ["../path/to/packages/your-package"]
}
I did not use exports in @your-package package.json
file.
This helps typescript to resolve types and use their latest definitions.
Hope that would help!