Skip to content

Commit

Permalink
chore: compatible with mts
Browse files Browse the repository at this point in the history
  • Loading branch information
lawvs committed Jun 17, 2024
1 parent eb87459 commit b73c040
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/rtk-query-codegen-openapi/src/bin/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ program.version(meta.version).usage('</path/to/config.js>').parse(process.argv);

const configFile = program.args[0];

if (program.args.length === 0 || !/\.(c?(jsx?|tsx?)|jsonc?)?$/.test(configFile)) {
if (program.args.length === 0 || !/\.([mc]?(jsx?|tsx?)|jsonc?)?$/.test(configFile)) {
program.help();
} else {
if (/\.c?tsx?$/.test(configFile) && !ts) {
if (/\.[mc]?tsx?$/.test(configFile) && !ts) {
console.error('Encountered a TypeScript configfile, but neither esbuild-runner nor ts-node are installed.');
process.exit(1);
}
Expand Down

0 comments on commit b73c040

Please sign in to comment.