-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
Hey,
as stated by the documentation, SolidJS uses Babel in combination with a preset to transpile the JSX/TSX. I am currently trying to transpile my SolidJS app using ESBuild in combination with a Deno setup and ran into a few problems after realizing that SolidJS needs the Babel preset. I am now using the the esbuild-plugin-solid and that works well.
But this seems like a "workaround", because the plugin does not utilize the speed of ESBuild because it just calls Babel transpiler under the hood. I was wondering what features SolidJS requires, that ESBuild currently does not offer. ryansolid mentioned that SolidJS needs "AST level plugin manipulation". Is this just for performance so that SolidJS can be optimized or is this needed for something else? And would it be possible to transpile SolidJS without the need of Babel and the preset?
Currently ESBuild offers a "minimalistic" plugin API. ESBuild does not create an AST, so "AST level plugin manipulation" would not be possible without an other parser on top (That's what the plugin currently does). But the question is if we even need "AST level plugin manipulation" in the first place.
Maybe someone can give me a hint on why is is so "complicated and complex" to transpile SolidJS JSX/TSX.