Skip to content

configModule ​

Opt in to executable config files that export a plain object as their default export. Registers .mjs, .cjs, and .js. Pass { typescript: true } to also register .ts, .mts, and .cts. Module format and supported TS syntax follow the host runtime. Only register this loader when you trust the files at your CLI's config search locations.

Signatures ​

ts
function configModule(options?: ConfigModuleOptions): PathConfigLoader;

Members ​

Members ​

configModule ​

Opt in to executable config files that export a plain object as their default export. Registers .mjs, .cjs, and .js. Pass { typescript: true } to also register .ts, .mts, and .cts. Module format and supported TS syntax follow the host runtime. Only register this loader when you trust the files at your CLI's config search locations.

ts
(options?: ConfigModuleOptions): PathConfigLoader;

Examples ​

ts
cli('myapp').config('myapp', [configModule({ typescript: true })]);

See Also ​

Released under the MIT License.