I have a monorepo that is utilizing PNPM workspaces. I've been working in development mode for some time now and following the turborepo guide. It says that my internal packages, the ones that I intend to share can be exported using the main index.ts file. This has worked all throughout development and has resulted in an amazing development experience but now I wanted to build this and I noticed that when I build my application I get errors because my main application is trying to import TypeScript code.
I knew that I would have to go and change the export in the package but the problem with this is that now I have to actually build my internal package and export JavaScript files and whenever I need to work in development I have to switch it back to the TypeScript files.
Is there any way that I can still have this amazing development experience while also being able to run builds. Please help me I've been struggling with this all day.