developit/htm

Babel Macro

Open

#150 创建于 2020年1月27日

在 GitHub 查看
 (4 评论) (0 反应) (0 负责人)JavaScript (181 fork)batch import
discussionenhancementgood first issuehelp wantedproposal

仓库指标

Star
 (8,453 star)
PR 合并指标
 (30 天内没有已合并 PR)

描述

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

贡献者指南