vadimdemedes/ink

Migrate Ink to ESM

pepicrft opened this issue ยท 2 comments

Hi ๐Ÿ‘‹๐Ÿผ

It's Pedro and Ju (@Arkham) from the team building Shopify's CLI. First of all, congrats for the great work done on this library. Ink has become the foundation of our CLI and we couldn't be happier with the choice we made. It's so easy to implement UI components on it.

We've been working on some performance optimizations, and we noticed the loading of Ink blocks the runtime while it loads the CommonJS graph. We'd love for the loading of Ink to happen along with the loading of the CLI's ESM module graph. Unfortunately, we can't make that happen because Ink is implemented in CommonJS with support for ESM interoperability.

We'd be up for doing the migration ourselves (including Ink's dependencies) with guidance from the maintainers of the project if this transition aligns with the direction of the package.

@sindresorhus @vadimdemedes any thoughts on this?

Thanks @pepicrft for the massive contribution in #546 โค๏ธ

For context, we're trying to resolve the remaining issues in that PR that currently block it from being merged. Once CI is green, ESM support will be shipped.