pinojs / pino-pretty

🌲Basic prettifier for Pino log lines

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't use default when dynamic import for TS module resolution: node16

jaredhan418 opened this issue · comments

//partial tsconfig
  "compilerOptions": {
    "moduleResolution": "Node16",
    "module": "Node16",
    "target": "ES2022",
  },
ts-node16

TS always throw error cuz default function not as expect when import pino-pretty in dynamic way.

suggest, add one line module.exports.PinoPretty= build below to match current index.d.ts

module.exports.default = build

Thanks for reporting! Would you like to send a Pull Request to address this issue?

#484 add PR here

Fixed in #484