New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question] Pino@7 transports and Webpack #1079
Comments
If you are able to figure it out, we will welcome a pull request to add documentation (or other). But none of the maintainers of Pino transpile/"pack" their server-side code. |
I have this same issue with webpack and am eager to see it resolved |
Hello, we just have landed the support for this in #1209 and we also now created the pino-webpack-plugin which should solve your need. Note that you need to update to pino 7.2.0 to have this working. Can you please let us know if it worked? |
@ShogunPanda Thanks for the update! I'm running into some issues, but it might be an issue with my setup. Webpack compiles with no errors, but when I try to try to run Error:
This is my webpack config:
|
@hmorey3 I've tried on my system and it works fine. Note that I had to remove Here's my webpack.config.js:
And here a sample
Do you mind sharing your |
@ShogunPanda Thanks for the quick reply. I removed cache loader as well but am still getting the same error. My tsconfig
My package.json
My pino logger setup
My dist folder
|
So...everything seems to be there.
(which might differ slightly since you are on Windows) Can you please copy it here? |
Interesting, some slashes in my paths seem to be missing or backwards slashes. I re-added them, and made everything forward slashes, and it worked! Here is the original output though:
|
That's very weird. Can you please execute: |
@ShogunPanda it outputs a backwards slash |
Which seems correct. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Hi all
Having chosen to use PNPM to manage the packages within my monorepo, I turned to Webpack 5 to create bundles for each of my Node apps (Webpack follows PNPM's links and creates single-file bundles that include each app's dependencies). Now, I want to add Pino to my apps and send my logs to LogDNA (using
pino-logdna
) and Sentry (usingpino-sentry
). I love that Pino@7 supports multiple transports using web workers. Unfortunately, I've no idea how to get Webpack to include Pino'sworker.js
, or how to persuade Node to then load the script from somewhere.How must I configure Webpack 5 to include Pino's
worker.js
?I've create a minimal repo (here) that I hope to make work with some help.
Thanks
Simon
The text was updated successfully, but these errors were encountered: