azu / rc-config-loader

Load config from .{product}rc.{json,yml,js} file
MIT License
60 stars 6 forks source link

Add support for .cjs file extension #16

Closed raineorshine closed 2 years ago

raineorshine commented 2 years ago

This PR adds default support for the .cjs file extension.

A .cjs file is a CommonJS JavaScript file: nodejs.org/api/packages.html#:~:text=Files%20ending%20with%20.cjs, babeljs.io/docs/en/config-files#:~:text=babel.config.cjs%20and%20.babelrc.cjs.

It’s common for CommonJS CLI tools to accept .cjs files as config files, so that projects with "type": "module" in their package.json have a way to specify the configuration for the CommonJS tool.

https://github.com/raineorshine/npm-check-updates/issues/1051

azu commented 2 years ago

Look good! Thanks!

azu commented 2 years ago

Released https://github.com/azu/rc-config-loader/releases/tag/v4.1.0