;\r\n})\r\n\r\nexport default trpc.withTRPC(MyApp);\r\n```\r\n\r\n#### After\r\n\r\n> Not thrilled about exactly this API-design, but gets the point across that `withTRPC()` can be tree shaken, feel free to do other suggestions\r\n\r\n```ts\r\n// _app.tsx\r\nimport { AppType } from 'next/dist/shared/lib/utils';\r\nimport { trpc } from '~/utils/trpc';\r\nimport { createTRPCNextWithTRPC } from '@trpc/next';\r\n\r\nconst MyApp: AppType = (({ Component, pageProps }) => {\r\n return \u003CComponent {...pageProps} />;\r\n})\r\n\r\nexport default createWithTRPC(trpc)(MyApp);\r\n```\r\n",[2933],{"name":2934,"color":2935},"RFC","78B062",2650,"Break out `withTRPC` from `createTRPCNext`?","2022-11-04T00:06:57Z","https://github.com/trpc/trpc/issues/2650",0.71432656,{"description":2942,"labels":2943,"number":2945,"owner":2869,"repository":2869,"state":2890,"title":2946,"updated_at":2947,"url":2948,"score":2949},"### Provide environment information\n\n```\n System:\n OS: Windows 11 10.0.26100\n CPU: (20) x64 13th Gen Intel(R) Core(TM) i5-13600KF\n Memory: 42.13 GB / 63.81 GB\n Binaries:\n Node: 20.18.3 - C:\\Program Files\\nodejs\\node.EXE\n npm: 10.8.2 - C:\\Program Files\\nodejs\\npm.CMD\n Browsers:\n Edge: Chromium (133.0.3065.69)\n Internet Explorer: 11.0.26100.1882\n npmPackages:\n typescript: ^5.8.2 => 5.8.2\n```\n\n### Describe the bug\n\nThe output type file references `@trpc/server/dist/unstable-core-do-not-import` but it's not declared in `package.json`\n\n\n\nI can't get the corret inferenced types from type files.\n\n\n\nIt can be fixed with\n\nserver/package.json\n```diff\n\"exports\": {\n...\n+ \"./dist/*\": {\n+ \"import\": \"./dist/*.mjs\",\n+ \"require\": \"./dist/*.js\",\n+ \"default\": \"./dist/*.js\"\n+ }\n}\n```\nOr the import path should be changed to `@trpc/server/unstable-core-do-not-import` without the `dist` part since `unstable-core-do-not-import` is exported in `package.json`\n\n\n\n### Link to reproduction\n\nhttps://stackblitz.com/edit/vitejs-vite-g9btbcfw?file=dist%2Ftypes%2Fapp-router.d.ts&view=editor\n\n### To reproduce\n\n`npm run build` and check *dist/types/app-router.d.ts*\n\n### Additional information\n\n_No response_\n\n### ๐จโ๐งโ๐ฆ Contributing\n\n- [x] ๐โโ๏ธ Yes, I'd be down to file a PR fixing this bug!",[2944],{"name":2866,"color":2867},6644,"bug: Missing `dist` exports from package.json","2025-03-28T15:45:58Z","https://github.com/trpc/trpc/issues/6644",0.7148882,{"description":2951,"labels":2952,"number":2953,"owner":2869,"repository":2869,"state":2890,"title":2954,"updated_at":2955,"url":2956,"score":2957},"### Describe the feature you'd like to request\n\nI wanted to use it for a project but does not look like it will be suitable.\r\n\r\nI found the API definition side support amazing. I managed to define my types with zod schemas and managed to wire together an API in a very clean fashion in typescript. This is exactly what I wanted - define my types once and having all the work done for me.\r\n\r\nWhen I tried to write a simple typescript client script to consume the API however, it didn't even compile and it was looking for predefined objects only available in the browser (e.g. fetch, WebSocket etc). I think we are assuming all consumers of the api will be web apps (maybe using nextjs or react or similar) - which I admit is the norm.\r\n\r\nSo this is not a bug report but rather a feature request. I would love to wire up systems with this wonderful tool the same way as it can use it to wire back end and front ends of a web service together.\r\n\r\nI also thought it was a bit weird that the \"client\" side was importing the router definition that was importing the \"@trpc/server\" package.\n\n### Describe the solution you'd like to see\n\nWould like if there were separate libraries for a non-web trpc client vs web-trpc clients.\n\n### Desribe alternate solutions\n\nAlso would like if we didn't have to include a @trpc/server package for client side definition. Maybe a @trpc/core that ships both with server and client? - just throwing ideas\n\n### Additional information\n\n_No response_\n\n### ๐จโ๐งโ๐ฆ Contributing\n\n- [ ] ๐โโ๏ธ Yes, I'd be down to file a PR implementing this feature!",[],3134,"feat: Make client library not tied to browser","2022-12-11T18:01:47Z","https://github.com/trpc/trpc/issues/3134",0.7155931,["Reactive",2959],{},["Set"],["ShallowReactive",2962],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$f0fUnNopAr8YSt1KxXVMFS428gKoJz4EOVjWlz784ZUE":-1},"/trpc/trpc/2143"]