Closed neolectron closed 1 year ago
You cannot pass a function as an option through a worker thread boundary. You have to create a worker.js that use pino-pretty directly.
Thank you for your confirmation, I didn't found any ressources saying that so I wasn't sure.
I just found out it what's described there, thanks for the reply.
Hello, I'm trying to use
pino-pretty
as a transport module for pino.Everything is up to date with latest npm (pino + pino-pretty). I'm using esbuild.
I'm doing this :
Which give me the error below :
I'm guessing this is because
pino
is usingStructuredClone
internally and the function cannot be cloned.The intention I had behind was just to have the
module
key between brackets.I haven't found anything in the documentation nor on google that tells me not to do that.
Any idea ? Thanks for your support.