htm
htm copied to clipboard
Feature request: add online tool (or babel REPL setup) to convert from JSX to htm
While converting a project from JSX to htm i missed a online tool (or a codepen/fiddlejs or babel repl setup) to run babel with babel-plugin-transform-jsx-to-htm
I tried to configure Babel REPL adding @babel/plugin-syntax-jsx and babel-plugin-transform-jsx-to-htm plugins with no luck (a bug in Babel REPL?)
This is a fantastic idea and I will absolutely try to find an hour to throw something together!
I've got some time today and create a simple one: https://github.com/blikblum/to-htm
Edit: it come also with a CLI and can convert from Handlebars
nice @blikblum!!
wanted to leave this link here for the Handlebars fans 👨🏻🦱 https://github.com/luwes/hyperstache
This works now in the official babel REPL:
https://babeljs.io/repl#?code_lz=DwEwlgbgfAhgBAMhgWwA4G44CNgHpzToBQQA&externalPlugins=babel-plugin-transform-jsx-to-htm%402.0.0