From fb2b8902c97d04a25e69dc5b2323e94814ae0cd9 Mon Sep 17 00:00:00 2001 From: Alexandra Parker Date: Fri, 12 Jul 2024 14:26:17 -0700 Subject: [PATCH] fix: allow running .tsx file --- packages/register/esm.mts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/register/esm.mts b/packages/register/esm.mts index 21d2b8bee..633539d16 100644 --- a/packages/register/esm.mts +++ b/packages/register/esm.mts @@ -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'], @@ -138,6 +138,7 @@ const EXTENSION_MODULE_MAP = { '.mjs': 'module', '.cjs': 'commonjs', '.ts': 'module', + '.tsx': 'module', '.mts': 'module', '.cts': 'commonjs', '.json': 'json',