Skip to content

Commit

Permalink
fix(register): allow running .tsx file (#812)
Browse files Browse the repository at this point in the history
  • Loading branch information
xandris authored Jul 13, 2024
1 parent 154ee94 commit 6a49076
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/register/esm.mts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const resolver = new ResolverFactory({
},
conditionNames: ['node', 'import'],
enforceExtension: EnforceExtension.Auto,
extensions: ['.js', '.mjs', '.cjs', '.ts', 'tsx', '.mts', '.cts', '.json', '.wasm', '.node'],
extensions: ['.js', '.mjs', '.cjs', '.ts', '.tsx', '.mts', '.cts', '.json', '.wasm', '.node'],
extensionAlias: {
'.js': ['.ts', '.tsx', '.js'],
'.mjs': ['.mts', '.mjs'],
Expand Down Expand Up @@ -138,6 +138,7 @@ const EXTENSION_MODULE_MAP = {
'.mjs': 'module',
'.cjs': 'commonjs',
'.ts': 'module',
'.tsx': 'module',
'.mts': 'module',
'.cts': 'commonjs',
'.json': 'json',
Expand Down

0 comments on commit 6a49076

Please sign in to comment.