Skip to content

Added support for esbuild-kit/tsx loader #100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Added support for esbuild-kit/tsx loader
  • Loading branch information
JulianJulius committed Aug 15, 2024
commit fe0ad014777502bdbfbc9196a4e378e41cd1d06f
14 changes: 13 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' }));
Expand Down