Conversation
|
I think your client-side bundler is misbehaving. In the package.json file we have |
Not all bundlers support I'm happy to see that you do feature detection in debug, still it doesn't seem right. Do you see any harm in change I proposed? Does it break anything? |
It seems ok over first glance. I am skeptical though because we've learned through history of this module that tweaks to these parts of code can break edge cases. I suppose we could merge though and wait for any complaints to pop up. I still think you should use a better bundler though 😉 |
Actually in this bundler it's more a feature than a bug :) Idea is to work with portable CJS modules pure, least custom way (best if no customizations involved). Think of it as strict mode for CJS ;-)
I'll be grateful. The issue could appear only if some would run it in env where |
Currently in main script it is assumed that browser environment defines
processobject, that's not right:I stumbled on it, when I tried to use debug in portable modules (ones that work on both server and client side) in a browser (via CJS bundler).
For time-being I'm relying on following workaround, but that's not quite beautiful.
This patch fixes it (and doesn't break proper Electron detection)