#JXS/TSX Transformation from within browser code?

1 messages · Page 1 of 1 (latest)

cunning meteor
#

Background: I'm working on a small browser/pwa based project that allows a user to define TSX components in a web form and and then render them as previews.

Question: Does Deno have a default or built in way to transform TSX that can be imbedded for use like this? My current plan was to import babel from it's npm package and use the typescript transform plugin; but if there's a more standard, efficient, or concise way built into deno that's be cool to know about! Thanks!

eager fractal
#

I'm decently-highly confident the answer is no, not without some hacks like writing to a file or calling a child process. Theres also a decent number of ways to create a security vulnerability on the backend with user generated code.

So I think babel in the frontend is your best bet

astral sentinel