developit/htm

Babel Macro

Open

#150 建立於 2020年1月27日

在 GitHub 查看
 (4 留言) (0 反應) (0 負責人)JavaScript (8,453 star) (181 fork)batch import
discussionenhancementgood first issuehelp wantedproposal

描述

It would be nice to have a babel macro that automatically runs the babel plugin to remove the runtime. That way, this project would work out of the box with "zero" config tools like create-react-app.

I'm thinking it could be something like:

import {html} from 'htm/preact/macro'

This is similar conceptually to CSS-IN-JS libraries providing a macro for their tools. See https://emotion.sh/docs/babel-macros

貢獻者指南