tslog icon indicating copy to clipboard operation
tslog copied to clipboard

Question- ESModule support in the browser

Open slynchDev opened this issue 2 years ago • 4 comments

I have a somewhat unique logging need for a project and this appears perfect.

The project has a collection of isomorphic TypeScript libraries (node and browser) and I'm using ES Modules only throughout (with ES Module Shims in the browser).

Do you see any issues with using this logger in the browser as an ES Module? I'm trying to avoid bundling (webpack, browserfy, etc).

Lastly, ideally I would get log line regardless of log level (not only with log.trace).

Thanks so much. I've written something in-house which meets all of the aforementioned requirements, however I'd prefer to standardize on something like tslog. Thank you in advance

slynchDev avatar Jan 15 '23 19:01 slynchDev

tslog is indeed a TypeScript and ESM-first logger. In fact, I only added CJS in one of the later releases. However, I don't use ESM on the client, but I believe it should work. I would really appreciate if you would try it out and hear your feedback.

terehov avatar Jan 17 '23 09:01 terehov

Okay, I will try it. Thank you

slynchDev avatar Jan 18 '23 14:01 slynchDev

@slynchDev Did you manage to try it out?

terehov avatar Feb 06 '23 07:02 terehov

Hello, I haven't had time yet but if I get to it I'll let you know 👍

slynchDev avatar Feb 10 '23 16:02 slynchDev