Winston leaking into client browser
Hello, I have set up a Winston logger in my project. It was working fine, but now I am getting a lot of vite console errors. I am getting mad, downgrading the library versions does not fix the issue, checking out to a previous commit does not work either 

What can I do??
Errors:
Errors:
chunk-6MKZ2R4L.js?v=15f518ab:11 Module "util" has been externalized for browser compatibility. Cannot access "util.inspect" in client code. See https://vite.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.
get @ chunk-6MKZ2R4L.js?v=15f518ab:11
...
node_modules/winston/dist/winston.js @ winston.js?v=01913275:13603
__require2 @ chunk-VHXUCOYC.js?v=15f518ab:20
(anonymous) @ winston.js?v=01913275:13668
chunk-6MKZ2R4L.js?v=15f518ab:11 Module "util" has been externalized for browser compatibility. Cannot access "util.format" in client code ....
winston.js?v=01913275:3171 Module "events" has been externalized for browser compatibility. Cannot access "events.EventEmitter" in client code...
...
winston.js?v=01913275:12442 Uncaught (in promise) TypeError: util.inherits is not a function
at node_modules/winston-transport/modern.js (winston.js?v=01913275:12442:10)
at __require2 (chunk-VHXUCOYC.js?v=15f518ab:20:50)
at node_modules/winston-transport/legacy.js (winston.js?v=01913275:12530:27)
at __require2 (chunk-VHXUCOYC.js?v=15f518ab:20:50)
at node_modules/winston/dist/winston/logger.js (winston.js?v=01913275:12796:33)
at __require2 (chunk-VHXUCOYC.js?v=15f518ab:20:50)
at node_modules/winston/dist/winston/create-logger.js (winston.js?v=01913275:13408:18)
at __require2 (chunk-VHXUCOYC.js?v=15f518ab:20:50)
at node_modules/winston/dist/winston.js (winston.js?v=01913275:13611:28)
at __require2 (chunk-VHXUCOYC.js?v=15f518ab:20:50)chunk-6MKZ2R4L.js?v=15f518ab:11 Module "util" has been externalized for browser compatibility. Cannot access "util.inspect" in client code. See https://vite.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.
get @ chunk-6MKZ2R4L.js?v=15f518ab:11
...
node_modules/winston/dist/winston.js @ winston.js?v=01913275:13603
__require2 @ chunk-VHXUCOYC.js?v=15f518ab:20
(anonymous) @ winston.js?v=01913275:13668
chunk-6MKZ2R4L.js?v=15f518ab:11 Module "util" has been externalized for browser compatibility. Cannot access "util.format" in client code ....
winston.js?v=01913275:3171 Module "events" has been externalized for browser compatibility. Cannot access "events.EventEmitter" in client code...
...
winston.js?v=01913275:12442 Uncaught (in promise) TypeError: util.inherits is not a function
at node_modules/winston-transport/modern.js (winston.js?v=01913275:12442:10)
at __require2 (chunk-VHXUCOYC.js?v=15f518ab:20:50)
at node_modules/winston-transport/legacy.js (winston.js?v=01913275:12530:27)
at __require2 (chunk-VHXUCOYC.js?v=15f518ab:20:50)
at node_modules/winston/dist/winston/logger.js (winston.js?v=01913275:12796:33)
at __require2 (chunk-VHXUCOYC.js?v=15f518ab:20:50)
at node_modules/winston/dist/winston/create-logger.js (winston.js?v=01913275:13408:18)
at __require2 (chunk-VHXUCOYC.js?v=15f518ab:20:50)
at node_modules/winston/dist/winston.js (winston.js?v=01913275:13611:28)
at __require2 (chunk-VHXUCOYC.js?v=15f518ab:20:50)Browser_errors6.81KB