webpack / webpack-cli

Webpack's Command Line Interface
https://webpack.js.org/api/cli
MIT License
2.55k stars 596 forks source link

`esbuild-kit/tsx` loader support for TypeScript configuration #3905

Open fregante opened 1 year ago

fregante commented 1 year ago

Feature request

What is the expected behavior?

Webpack could use esbuild-kit/tsx automatically if found, just like it already supports:

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:

Are you willing to work on this yourself?

Potentially

Also we need:

fregante commented 1 year ago

Actually this should probably be moved to webpack-cli:

https://github.com/webpack/webpack-cli/blob/338254e79a9b5007873f3b070c87fc03a98a7c1f/packages/webpack-cli/package.json#L47

snitin315 commented 1 year ago

Yes, we use interpret in webpack-cli.

alexander-akait commented 1 year ago

@fregante I think we can provide an option to support loaders that is not supported by interpret, is it fine for you?

fregante commented 1 year ago

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:

alexander-akait commented 1 year ago

@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

adarsh500 commented 9 months ago

Hey everyone, i'm pretty new here and i'd like to work on this issue