moloch
Explore posts from serversTTCTheo's Typesafe Cult
•Created by moloch on 10/5/2023 in #questions
Has anyone managed to generate a static tailwind config using something like next-plugin-preval?
Hey y'all!
next-plugin-preval seems to be a pretty outdated plugin that doesn't play nice with config.transpilePackages. However, it seems wild to me that I have to include a bunch of unneeded tailwind javascript code in my client bundle just to import and use things like my theme colours and breakpoints. Has anyone found a solution to this?
next-plugin-preval seems to be a pretty outdated plugin that doesn't play nice with config.transpilePackages. However, it seems wild to me that I have to include a bunch of unneeded tailwind javascript code in my client bundle just to import and use things like my theme colours and breakpoints. Has anyone found a solution to this?
1 replies
Missing keys in TRPCError when returning as JSON
Hey all! I am returning a TRPCError from a custom TRPC server but only the code and name keys seems to be serialized and returned to the client. It's quite strange. If I directly return a key such as error.message I get the string no problem, but if I return the entire error object I only recieve error.code and error.name . Any idea why this is?
Here's a little code snippet:
1 replies
TTCTheo's Typesafe Cult
•Created by moloch on 4/6/2023 in #questions
Build for production with custom server
Hey everyone! I've been struggling to create a T3 setup that includes a custom server on production. I've looked at a few Next.js custom sever example projects but the env.mjs seems to through a wrench in the build process. Does anybody have a working project example that builds a custom server using create-t3-app ?
1 replies
Is there a way to define the Websocket protocol when using wsLink()
I am attempting to use tRPC with Azure's Pub/Sub Websockets service it appears to require custom protocols to be defined as explained here: https://learn.microsoft.com/en-us/azure/azure-web-pubsub/reference-json-webpubsub-subprotocol
They give the following code example:
How might this be done using:
1 replies
Cannot get subscription event to fire
Ripping my hair out here trying to get Websockets working with tRPC and Next. Everything seems to be working and the frontend client is connecting to my websocket server, however triggering the addFact mutation does not not successfully emit the new catFact despite there not being any errors. I've looked at various repos that achieve similar functionality and haven't been able to spot the problem, does anyone have any guidance?
8 replies