79614213

Date: 2025-05-09 13:23:58
Score: 0.5
Natty:
Report link

The strategy described is not recommended, due to how package manager workspaces work. A workspace and, more broadly, the JS ecosystem, expect that the workspace's definition is at the root of the workspace. What you're doing may work in the short term, or on accident, but it's not recommended.

To share code across workspaces, it's recommended to publish a package to a registry and consume it from there, like you would for any other external package.

Note: The limitations/expectations involved in this decision are based on package managers, not Turborepo. Turborepo does adhere to expectations of the JavaScript ecosystem, so what's described in the question doesn't work because of how package manager workspaces work by convention.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Anthony Shew