Skip to content

Commit

Permalink
add support for .cjs and .cts files in codegen cli
Browse files Browse the repository at this point in the history
  • Loading branch information
Ludvig Svedberg committed Jun 22, 2022
1 parent 666f182 commit 1e4466c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/rtk-query-codegen-openapi/src/bin/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ program.version(meta.version).usage('</path/to/config.js>').parse(process.argv);

const configFile = program.args[0];

if (program.args.length === 0 || !/\.(jsx?|tsx?|jsonc?)?$/.test(configFile)) {
if (program.args.length === 0 || !/\.(c?(jsx?|tsx?)|jsonc?)?$/.test(configFile)) {
program.help();
} else {
if (/\.tsx?$/.test(configFile) && !ts) {
Expand Down

0 comments on commit 1e4466c

Please sign in to comment.