tRPC Monorepo w/ Package Path Aliases
Does anyone have a working example of tRPC's API router definitions in a package in a monorepo with path aliases working in that sub package? Something like
create-t3-turbo
but with path aliases in that API sub package. I see Julius has setup a great monorepo example, however I see in all the packages he is only using relative imports.
Is this possible?5 Replies
@julius Sorry for the tag, but might need some expert knowledge here.
Path aliases are a build system question, tRPC doesn’t care so long as your typescript and bundler setup is correct
I use absolute imports all the time at work
of course, however i'm just wondering if you've worked in a repo with path aliases in subpackages
in any build system
Takes a bit of configuration typically but yeah you can do it
specifically
someApp
<- trpc
with trpc procedure definitions being imported by path alias