Next 13 (app dir) polyfills
Unanswered
Cornish Rex posted this in #help-forum
Cornish RexOP
Hi. I'm trying to use trpc in app dir with tsyringe. Tyringe requires you to add the reflect-metadata polyfill. I tried using the intrumentation.ts technique (https://nextjs.org/docs/app/building-your-application/optimizing/instrumentation), but it didn't work out even if I tried polyfilling both client and server (https://github.com/vercel/next.js/discussions/46805#discussioncomment-6747654). I want only the backend to use the polyfill, there is no reason to do that on the client.
I also tried importing "reflect-metadata" in (root) layout.ts and the trpc handler but none have worked so far.
Has anyone tried doing this? Any solutions? thanks!
I also tried importing "reflect-metadata" in (root) layout.ts and the trpc handler but none have worked so far.
Has anyone tried doing this? Any solutions? thanks!