DI-compiler icon indicating copy to clipboard operation
DI-compiler copied to clipboard

JSX support for transform() API method

Open arm1n opened this issue 1 year ago • 0 comments

I am trying to use the proposed approach from the docs with direct usage of transform(code, filename, options).

Unfortunately, this does not work when running TSX files as transform() is hardcoding the script type to ScriptKind.TS.

From a quick test it would be sufficient to simply remove this parameter, TS seems to figure it out implicitly. Alternatively, using a factory method like used in the tests would be possible as well I guess.

Is there any chance to get TSX for the transform() method? It would be super helpful as it's a tremendous performance improvement compared to using the rollup TS plugin.

Thanks for any response and the awesome work on this piece of code!

arm1n avatar Aug 09 '23 20:08 arm1n