Skip to content

Commit

Permalink
feat: support .mts .cts
Browse files Browse the repository at this point in the history
  • Loading branch information
bluelovers committed Dec 9, 2021
1 parent 3a2848c commit 5dfa269
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/index.ts
Expand Up @@ -505,6 +505,8 @@ export function getExtensions(config: _ts.ParsedCommandLine) {

// Enable additional extensions when JSX or `allowJs` is enabled.
if (config.options.jsx) tsExtensions.push('.tsx');
if ([5, 6, 7, 99, 199].indexOf(config.options.module) !== -1) tsExtensions.push('.mts');
if ([1, 199].indexOf(config.options.module) !== -1) tsExtensions.push('.cts');
if (config.options.allowJs) jsExtensions.push('.js');
if (config.options.jsx && config.options.allowJs) jsExtensions.push('.jsx');
return { tsExtensions, jsExtensions };
Expand Down

0 comments on commit 5dfa269

Please sign in to comment.