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

JSX support for transform() API method #24

Open
arm1n opened this issue Aug 9, 2023 · 0 comments
Open

JSX support for transform() API method #24

arm1n opened this issue Aug 9, 2023 · 0 comments

Comments

@arm1n
Copy link

arm1n commented Aug 9, 2023

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant