webpack-cli
webpack-cli copied to clipboard
`esbuild-kit/tsx` loader support for TypeScript configuration
Feature request
What is the expected behavior?
Webpack could use esbuild-kit/tsx automatically if found, just like it already supports:
- ts-node/register
- sucrase/register/ts
- @babel/register
- esbuild-register
- @swc/register
What is motivation or use case for adding/changing the behavior?
I'd like to use this loader because it's the most straightforward I found so far, without issues and verbose configuration. I wish this was supported natively in Webpack.
How should this be implemented in your opinion?
Is it correct that Webpack uses interpret
under the hood to load configuration? If so, I think this change can be followed up in its repo:
- https://github.com/gulpjs/interpret/issues/95
Are you willing to work on this yourself?
Potentially
Also we need:
- tsimp support
Actually this should probably be moved to webpack-cli
:
https://github.com/webpack/webpack-cli/blob/338254e79a9b5007873f3b070c87fc03a98a7c1f/packages/webpack-cli/package.json#L47
Yes, we use interpret
in webpack-cli.
@fregante I think we can provide an option to support loaders that is not supported by interpret
, is it fine for you?
It seems to me that this already works but I was hoping to see native support since the package is quite popular (more than some existing parsers used by Interpret).
However this stopped working in Node 20. See:
- https://github.com/webpack/webpack-cli/issues/3889
@fregante I think we can send a PR for https://github.com/gulpjs/interpret/issues/95 and ask to merge it, also, yeah, I can modify default loaders array and put this as a temporary workaround until interpret
team merge
Hey everyone, i'm pretty new here and i'd like to work on this issue