Skip to content
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

Use ESBuild config #491

Closed
4 of 6 tasks
Henry-Hiles opened this issue Mar 9, 2024 · 2 comments
Closed
4 of 6 tasks

Use ESBuild config #491

Henry-Hiles opened this issue Mar 9, 2024 · 2 comments
Labels

Comments

@Henry-Hiles
Copy link

Precheck

  • I searched existing issues before opening this one to avoid duplicates
  • I understand tsx aims for TypeScript parity and will not support arbitrary Node.js enhancements
  • This request cannot be made to Node.js directly, and is specific to tsx
  • I understand this form is not for addressing a bug or seeking help

Feature request

I would love it if you could add esbuild configuration for TSX to use (specifically plugins). I believe tsx uses esbuild internally, so this should be possible.

Motivations

Id like to be able to use plugins like esbuild-plugin-import-pattern with tsx.

Alternatives

No response

Additional context

No response

Contributions

  • I plan to open a pull request for this issue
  • I plan to make a financial contribution to this project
@Henry-Hiles Henry-Hiles added enhancement New feature or request pending triage labels Mar 9, 2024
@privatenumber
Copy link
Owner

tsx is designed to enhance Node with TypeScript support, requiring no configuration to get started.

Even if we wanted to add an esbuild config, we can't because tsx uses esbuild's Transform API to process TypeScript, which doesn't support plugins.

On the flip side, because tsx is built to enhance Node, you can customize it in the same way you would with Node itself. But, if esbuild plugin use is a must for you, using esbuild directly is recommended.

@privatenumber privatenumber closed this as not planned Won't fix, can't repro, duplicate, stale Mar 10, 2024
@Henry-Hiles
Copy link
Author

Henry-Hiles commented Mar 10, 2024

I see, thank you. I can probably work around it (I just need to figure out how to exclude files in rebuild so they only show up in tsx)

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants