After dedicating a significant amount of time to unraveling this issue, I find myself at a standstill.
Incorporating Turbo as a monorepo, I utilized the create-turbo@latest
command, outlined in detail here.
While the default ui/package functions properly, I am hesitant to manually export everything in the package.json as shown below (view source code here):
{
"name": "@repo/ui",
"version": "0.0.0",
"private": true,
... // Remaining content remains unchanged
Referencing Steven Tey's Dub.co for guidance, I opted to utilize TSUP to compile my UI library. Despite mirroring his configurations down to the tsconfig, I continue to encounter errors within my web app due to the UI library not being recognized and certain components malfunctioning. These components have functioned flawlessly across various projects for years, only revealing issues within the monorepo environment.
Additionally, adjusting my ui library's package.json to specify "src/index.tsx" as the entry point, where all exports/imports are consolidated, results in error messages such as:
// Error message here...
Irrespective of how meticulously I configure the ui library's package.json file, tsconfigs, or TSUP settings, I remain besieged by a cascade of errors.
The attempts made to bundle the UI library prove futile. Is there anyone who has achieved this successfully without encountering similar challenges?