
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
rollup-plugin-pino-bundle
Advanced tools
This plugin provides seamless bundling of Pino logger and its transports for Rollup and Vite projects. It handles the special requirements of Pino's worker threads and file transports, making them work properly in bundled applications.
npm install -D rollup-plugin-pino-bundle
import { rollup } from 'rollup';
import pinoBundle from 'rollup-plugin-pino-bundle';
const bundle = await rollup({
input: 'src/main.js',
plugins: [
pinoBundle({
transports: ['pino-pretty'], // optional transports to include
pinoDir: 'custom-pino', // optional custom directory
}),
],
});
import { defineConfig } from 'vite';
import pinoBundle from 'rollup-plugin-pino-bundle';
export default defineConfig({
plugins: [
pinoBundle({
transports: ['pino-pretty'], // optional transports to include
transportsDir: 'custom-transports', // optional custom transports directory
}),
],
});
transportsType: string[]
Default: []
An array of pino transport module names to bundle with your application.
Example:
pinoBundle({
transports: ['pino-pretty', 'pino-loki'],
});
pinoDirType: string
Default: 'pino'
Set custom directory for pino files. This is the root directory where all pino-related files will be placed.
Example:
pinoBundle({
pinoDir: 'custom-pino',
});
transportsDirType: string
Default: ${pinoDir}/transports
Set custom directory for all transports. By default, it will be a subdirectory of the pinoDir.
Example:
pinoBundle({
transportsDir: 'my-transports', // will be relative to output directory
});
The plugin creates the following directory structure in your output folder:
/pino
/pino.js # Main pino bundle
/transports
/pino-file.js # File transport worker
/pino-worker.js # Worker implementation
/thread-stream-worker.js # Thread stream worker
/[transport-name].js # Any additional transports you specify
The plugin implements caching to improve build performance
The package includes TypeScript type definitions out of the box.
Problem: Transports not working in production build
Solution: Make sure to include all required transports in the transports option
Contributions are welcome! Please open issues or pull requests on GitHub.
MIT
FAQs
Rollup plugin for bundling PinoJS logger with transports
We found that rollup-plugin-pino-bundle demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.