Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support ESM only for the config file #599

Closed
sindresorhus opened this issue Feb 6, 2021 · 1 comment · Fixed by #683
Closed

Support ESM only for the config file #599

sindresorhus opened this issue Feb 6, 2021 · 1 comment · Fixed by #683

Comments

@sindresorhus
Copy link
Owner

No matter whether "type": "module" is used in package.json, we should use ESM for the config file.

Blocked by cosmiconfig/cosmiconfig#224.

@nnmrts
Copy link
Contributor

nnmrts commented Feb 13, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants