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
The package cliui remove "some" colors when working with ESM. Everything is fine with CJS. I found the problem on a CLI project I just migrated and I couldn't understand why my colors were not working anymore.
I'm working on Windows 10 and Node.js v16
How to reproduce:
$ mkdir cliui_bug
$ cd cliui_bug
$ npm init -y
$ npm i kleur cliui -P
# Add type: module in package.json
A few of the key dependencies are not available for dual cjs and esm builds. The first esm build of cliui stayed "pure" and substituted in some simple routines rather than use the older cjs flavours. I think this is probably the cause of the difference you see.
There are some open issues and PR about the problem and possible solutions: #89#138#139#140
Hello 👋
The package
cliui
remove "some" colors when working with ESM. Everything is fine with CJS. I found the problem on a CLI project I just migrated and I couldn't understand why my colors were not working anymore.How to reproduce:
The index.js file
Output with ESM:
The title with cliui doesn't work. If you switch the project to CJS it will work as expected.
Best Regards,
Thomas
The text was updated successfully, but these errors were encountered: