We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0a71f10 commit 94d2f17Copy full SHA for 94d2f17
1 file changed
packages/core/src/logger.ts
@@ -49,12 +49,14 @@ export class ObjectLogger implements Logger {
49
/**
50
* Initialize Pino logger for Node.js
51
*/
52
- private initPinoLogger() {
+ private async initPinoLogger() {
53
if (!this.isNode) return;
54
55
try {
56
// Dynamic import for Pino (Node.js only)
57
- const pino = require('pino');
+ // Use dynamic import for ESM compatibility
58
+ const pinoModule = await import('pino');
59
+ const pino = pinoModule.default || pinoModule;
60
61
// Build Pino options
62
const pinoOptions: any = {
0 commit comments