fix: import consola properly to ensure logs appear in console#109
fix: import consola properly to ensure logs appear in console#109dulnan merged 4 commits intodulnan:mainfrom
Conversation
|
It seems that tests failed because of an outdated lock-file. So I’ll leave it up to you. |
|
Thank you very much! I will look into the lock file issue. |
|
Ah, I now remember why I did use that import. It is to prevent including consola in the client bundle. Because, even if |
|
I'm now overriding the contents of the logger file with |
|
Thanks for your work and your quick response. |
When importing from
consola/core, the logger was created without reporters, resulting in logs not appearing in the console. This made debugging difficult as module messages weren’t displayed.Fixed by changing the import path from
consola/coreto justconsola, ensuring the logger is created with proper default reporters.https://github.com/unjs/consola/blob/512d570b3f99a27b6766a885cae2730aa3dc0ed4/src/index.ts#L17-L42
@dulnan