pino-pretty nor really bundled with SvelteKit build
Closed this issue · 4 comments
PlkMarudny commented
I tried to use the plugin with SvelteKit, and was somehow successful, except that the bundled app apparently cannot find pino-pretty, I received this during the start of application:
Error: unable to determine transport target for "pino-pretty"
wd-David commented
That’s an interesting use case!
May I know the reason you use this library with SvelteKit?
PlkMarudny commented
I have a custom Node server for SvelteKit (because of Web Sockets) and I
use Pino with it, so basically Pino lands in my SvelteKit app. But it does
not work in the production build (unless kept in dependencies, not dev
dependencies, but in that case the whole node_modules adds 900MB of the
container size).
…On Wed, Nov 23, 2022, 17:34 David Peng ***@***.***> wrote:
That’s an interesting use case!
May I know the reason you use this library with SvelteKit?
—
Reply to this email directly, view it on GitHub
<#62 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABBI25ZQ4PGEWT34EYFDJS3WJYMQFANCNFSM6AAAAAASIWXQNM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
wd-David commented
You're right. While pino-pretty
doesn't recommend installing it as dep but devDep here.
Not sure how you build your docker image, in my use case, I bundled my fastify app (pino-pretty
in dep) and only copied production code w/o node_modules
in my Dockerfile
, and my docker image only used 180 MB.
PlkMarudny commented
Right, however I cannot make it work somehow. There is always something
pino is complaining about, unless I copy the whole node_volumes. No
worries, at the end I just replaced pino with loglevel; unfortunately I
cannot get rid of logging altogether, but for the time being it is fine.
Will try to investigate that later.
Tomasz Plonka
…On Fri, Nov 25, 2022 at 11:25 AM David Peng ***@***.***> wrote:
You're right. While pino-pretty doesn't recommend installing it as dep
but devDep here
<https://github.com/pinojs/pino-pretty#programmatic-integration>.
Not sure how you build your docker image, in my use case, I bundled my
fastify app (pino-pretty in dep) and only copied production code w/o
node_modules in my Dockerfile, and my docker image only used 180 MB.
—
Reply to this email directly, view it on GitHub
<#62 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABBI254WX5RV4XK7CXRMF7DWKBSWZANCNFSM6AAAAAASIWXQNM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>