sindresorhus / meow

🐈 CLI app helper
MIT License
3.54k stars 151 forks source link

How to use with commonjs? #204

Closed henhal closed 2 years ago

henhal commented 2 years ago

It seems ìmportMetais mandatory, butimport.metais only available ifmoduleises2020` etc.

If using meow from a package using module: commonjs, what should be passed as importMeta?

TBH I'm not sure what importMeta is used for so I couldn't immediately understand how to tackle this.

papb commented 2 years ago

You need to use v9 of meow.

https://github.com/sindresorhus/meow/tree/v9.0.0

Also you have a mistake in your markdown rendering, I'd edit for you if I had permissions to do so :)

sindresorhus commented 2 years ago

Meow requires ESM.

https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c