SBoudrias/Inquirer.js

Compatibility with commonjs

gabriel-logan opened this issue · 4 comments

image

Please make a version that supports commonJs, I use typescript in a specific project where I can only use commonjs, that's not cool...

If you are using typescript to produce, I would give you a tip, send it to npm using

 "module": "CommonJS",

in tsconfig because this way it transpiles to CommonJS and whoever uses your code can use it either via import or via require

the way you did it, only import export works

Please refer to the installation guide. Both version 9 (esm) and 8 (cjs) are in maintenance mode.

Recommendation is to migrate to the new API; see #1214

Ok, I get my answer

image

I just dont know why not use commonJs too.

The new API supports both (it's in typescript making it easy)