kentcdodds / mdx-bundler

🦤 Give me MDX/TSX strings and I'll give you back a component you can render. Supports imports!
MIT License
1.79k stars 75 forks source link

Add debugging output to the inMemory plugin #47

Closed gaelhameon closed 3 years ago

gaelhameon commented 3 years ago

While working on #41 , I added console.log in a couple of places to better understand what was going on. You can have a look here: https://github.com/kentcdodds/mdx-bundler/compare/main...gaelhameon:wip

What would you think of including debug as a dependency, and turning these console.log into actual debugging output ?

I'm guessing that it could prove useful for cases where we load files that load other files that load other files etc.

@kentcdodds , if I submitted a PR for that, is this something you'd be interested in merging ?

kentcdodds commented 3 years ago

Personally by the time I realize that I can use debug on a package, I've already started digging into the source code and I can manually insert my own log statements, so I'm not sure I feel like it's necessary 🤷