developit/htm

Babel Macro

Open

#150 opened on Jan 27, 2020

View on GitHub
 (4 comments) (0 reactions) (0 assignees)JavaScript (8,453 stars) (181 forks)batch import
discussionenhancementgood first issuehelp wantedproposal

Description

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

Contributor guide

Babel Macro · developit/htm#150 | Good First Issue