np
np copied to clipboard
Support ESM only for the config file
No matter whether "type": "module"
is used in package.json, we should use ESM for the config file.
Blocked by https://github.com/davidtheclark/cosmiconfig/issues/224.
Is cosmiconfig really needed here? It seems to me that a specific solution for np would be easier to do.
Also, cosmiconfig does all that "searching up the directory tree" stuff, which is great for more complex configuration tools and linters and all that, but a project that uses an np-config, will only ever have one file per package.json. So in most cases just one config file, which is in the project root directory, right?
I also feel like np as a whole moving to ESM would fix this issue "automatically" and is the end goal anyway, as far as I understand. I'll open another issue to track this.