-
Notifications
You must be signed in to change notification settings - Fork 19
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
Use with ES Modules #36
Comments
I would say that's only for commonjs for now. It might be possible to do this with a module loader. |
Does this not work?: const pinoDebug = await import('pino-debug') |
@jsumners: |
I'm using
esbuild
on a project andpino-debug
doesn't work because we're not using common js. I'm sure the exact same problem exists with webpack and maybe something similar with es modules in nodejs itself.pino-debug
modifies the module wrap which is super neat. However it's not used when bundling up the code base because the native require is never called. And it's possibly not used when using a es modules as there seems to be another way to do this kind of thing.I'm pretty sure we could replace the
debug
package with a package of our choosing in the bundler approach. (I'm fuzzy on how.) I don't know what to do with native es modules.Would solving this problem in this repo be welcome? I'd love to use
pino-debug
but if it's only for common js that's ok too.The text was updated successfully, but these errors were encountered: