{"library":"pino-webpack-plugin","title":"pino-webpack-plugin","description":"A Webpack plugin that enables bundling pino v7+ logger with webpack-generated bundles. Version 2.0.0 supports webpack 5 and requires Node >=12.13.0. It works by extracting pino's worker threads (thread-stream, pino-worker, pino-pipeline-worker, pino-file) into separate bundle files, which must be deployed alongside the main bundle. The plugin allows specifying extra transports like pino-pretty. Key differentiator: it's the official way to use pino in webpack projects, addressing the incompatibility between pino's Node.js Worker Threads architecture and webpack's bundling. Ships TypeScript types.","language":"javascript","status":"active","last_verified":"Sat Apr 25","install":{"commands":["npm install pino-webpack-plugin"],"cli":null},"imports":["import { PinoWebpackPlugin } from 'pino-webpack-plugin'","const { PinoWebpackPlugin } = require('pino-webpack-plugin')","import type { PinoWebpackPluginOptions } from 'pino-webpack-plugin'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"const { PinoWebpackPlugin } = require('pino-webpack-plugin');\nconst path = require('path');\n\nmodule.exports = {\n  mode: 'production',\n  entry: './src/index.js',\n  output: {\n    path: path.resolve(__dirname, 'dist'),\n    filename: 'bundle.js'\n  },\n  plugins: [\n    new PinoWebpackPlugin({\n      transports: ['pino-pretty']\n    })\n  ]\n};","lang":"javascript","description":"Basic webpack configuration that includes pino-webpack-plugin with a pino-pretty transport.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}