Np: Change Inquirer to a lighter alternative

Created on 21 Jan 2019  路  6Comments  路  Source: sindresorhus/np

Inquirer is bloated - almost 7 MB

We should consider changing it to a lighter alternative. I suggest these packages:

What do you think @sindresorhus ?

Most helpful comment

Maybe if we use Webpack or something it can be treeshaken...

All 6 comments

Inquirer is mostly bloated because of RxJS, but np depends on RxJS directly too, so switching wouldn't help much. https://packagephobia.now.sh/result?p=rxjs

Related: https://github.com/ReactiveX/rxjs/issues/3753

A better solution is to help RxJS reduce their size. Bump the linked issue and offer to help ;)

Maybe if we use Webpack or something it can be treeshaken...

@sindresorhus Ok, I bumped your issue in the RxJS repo ;)

I think we can close my issue since Inquirer is not a problem here. Also, I realized it would be tricky to use one of the alternative packages since they don't have some useful features, that np uses :smile:

It seems like this can be closed now, as the main problem is on rxjs's side. One thing that comes to mind is that if we move np to use ESM instead of CommonJS, we can import specific parts of rxjs, which should lower the install size.

One thing that comes to mind is that if we move np to use ESM instead of CommonJS, we can import specific parts of rxjs, which should lower the install size.

That would only help if we bundled the np code with something like Webpack, which I don't intend to.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

inker picture inker  路  4Comments

papb picture papb  路  6Comments

koppor picture koppor  路  5Comments

bennycode picture bennycode  路  4Comments

artivilla picture artivilla  路  5Comments