developit/htm

Babel Macro

Open

#150 aperta il 27 gen 2020

Vedi su GitHub
 (4 commenti) (0 reazioni) (0 assegnatari)JavaScript (181 fork)batch import
discussionenhancementgood first issuehelp wantedproposal

Metriche repository

Star
 (8453 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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

Guida contributor