You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our handy logger has good potential in browsers. It looks good and I've tested that it works, but it did require various changes which I don't feel comfortable pushing because it affects Node compatibility.
We should gracefully do the following:
Avoid env.js import in browser environments (browsers don't like loadEnv() and its node: imports.
Write to console instead of process.stdout. Browsers also don't like our node:utils import for inspect, so we may need to selectively import that as well.
Don't flush logs in browser environments because console is synchronous.
Refactor color.js to selectively import node:tty outside of browser environments.
Once that's done, we should export the logger as it's own module for better bundle size: @roboplay/robo.js/logger
The text was updated successfully, but these errors were encountered:
Our handy logger has good potential in browsers. It looks good and I've tested that it works, but it did require various changes which I don't feel comfortable pushing because it affects Node compatibility.
We should gracefully do the following:
env.js
import in browser environments (browsers don't likeloadEnv()
and itsnode:
imports.console
instead ofprocess.stdout
. Browsers also don't like ournode:utils
import forinspect
, so we may need to selectively import that as well.color.js
to selectively importnode:tty
outside of browser environments.Once that's done, we should export the logger as it's own module for better bundle size:
@roboplay/robo.js/logger
The text was updated successfully, but these errors were encountered: