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
pino logger crashed webpack production build #3518
Comments
Hi Dragos, |
Thanks for the reply. The main reason why I wanted to add pino is because of its dynamic transport support. So in dev I would use Would be nice to get pino working tho. I tried looking into this myself, but I don't have experience with webpack so I got stuck. Thanks again and enjoy the rest of your weekend! |
Pre-flight checklist
Electron Forge version
7.3.0
Electron version
29.1.0
Operating system
macOS 14.3.1 Sonoma
Last known working Electron Forge version
No response
Expected behavior
npm run make
should successfully create a production webpack bundle.Actual behavior
npm run make
crashes with the following error:Steps to reproduce
Clone this example project: https://github.com/beastx-ro/electron-pino-crash-sample
npm run make
Additional information
Hi! I've been trying to integrate pino logger into my electron-forge project.
Due to the way pino is architected (logs are actually handled in a web-worker) I had to make some changes to the webpack config:
output.filename
inwebpack.main.config.ts
to make pino files output separately from the rest of the bundleNow, the interesting part is that in debug mode (
npm run start
) it works, I can successfully see pino-pretty logs in the console. But when I try to make a production build it fails with the mentioned webpack error.I've been trying to figure out how to fix it, but no luck so far. I don't think the problem is with pino since the debug app works, has something to do with how forge-webpack does the bundling.
Any help would be appreciated. Thanks!
The text was updated successfully, but these errors were encountered: