SBoudrias/Inquirer.js

Making chalk an optional dep

prisis opened this issue · 3 comments

Just an idea, to reduce the bundle size, and have the possibility to switch to a different ansi color package, I would propose headless core components.

The styling for the core components can be then done with the theme prop.

How large is chalk realistically?

When you check https://bundlephobia.com/package/chalk@4.1.2 it's around 20.4kb.

Was more thinking in the direction of if a project is using picolors there is no way to replace it, so you have 2 color lib in your project.

Coming back to this, I'm not interested in shipping the packages without all batteries included. While it might be beneficial for some, I don't see it as a widespread need.

Feel free to work on, and why not document, a workaround with your package manager config and passing in custom themes.