Skip to content
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

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

Closed
jaredhan418 opened this issue Oct 14, 2023 · 4 comments
Closed
Labels
good first issue Good for newcomers

Comments

@jaredhan418
Copy link
Contributor

//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.

@jaredhan418
Copy link
Contributor Author

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

module.exports.default = build

@mcollina
Copy link
Member

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

@mcollina mcollina added the good first issue Good for newcomers label Dec 26, 2023
@jaredhan418
Copy link
Contributor Author

#484 add PR here

@mcollina
Copy link
Member

Fixed in #484

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants