how to build tRPC and Prisma with express?

Bbackbone3/8/2023
I am using TSC as the official docs example does.
But when I use paths in tsconfig.json, It does not work because of not transforming paths . Should I add webpack like nestjs doing?
UUUnknown User3/8/2023
2 Messages Not Public
Sign In & Join Server To View
Nnlucas3/8/2023
How are you building the app? Are you running with ts-node, or using tsc to transpile and then running the output code with node?
Nnlucas3/8/2023
esbuild or some bundle can be a good solution, but might be more complex than supporting paths. This is very useful to just add support for the path mappings at runtime: https://github.com/dividab/tsconfig-paths
Bbackbone3/8/2023
Thanks very much, I will try it.
Bbackbone3/8/2023
Hello, I have solved it through @vercel/ncc which can build node project into one js file . And recommend to you.
Nnlucas3/8/2023
That’s very interesting, they mention something about “binary addons”, does that mean using a native binding like a DB driver will work? Problem I’ve seen with bundlers and NodeJS is they often break these native packages
Bbackbone3/8/2023
ncc will package all your dependency, of course including prisma binary or others. And I also solve prisma binary problem using this amzing tool.
Bbackbone3/8/2023
I think the subject about build & deploy need add to the official docs.
Nnlucas3/8/2023
Well tRPC is just a NodeJS package, build & deploy are up to whatever repo solution you choose, and it sounds like you’ve personally gone for something quite home-rolled
Nnlucas3/8/2023
Might be one to provide a simple solution for in the QuickStart guide though, I’m currently having a think on that as it’s lacking in many areas
Bbackbone3/8/2023
ok, I am glad to show some code,if it could help you a little.❤️
Nnlucas3/8/2023
If there's anything you would advocate for then please do pop it here: https://github.com/trpc/trpc/issues/3947