From fe0ad014777502bdbfbc9196a4e378e41cd1d06f Mon Sep 17 00:00:00 2001 From: Julian Jaffe Date: Thu, 15 Aug 2024 15:06:41 -0400 Subject: [PATCH] Added support for esbuild-kit/tsx loader --- index.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index b951fd9..fc9fc99 100644 --- a/index.js +++ b/index.js @@ -106,7 +106,19 @@ var extensions = { only: [endsInBabelTs], presets: ['@babel/preset-env', '@babel/preset-typescript'], }, - ], + +'.esbuild.tsx', { + module: 'esbuild-kit/tsx', + register: function (hook, config) { + config = config || { + loader: 'tsx', + target: 'es2020', // Adjust target if needed + }; + + hook(config); + }, +}, + ], }; hook(Object.assign({}, config, { extensions: '.ts' }));