developit/htm

Babel Macro

Open

#150 ouverte le 27 janv. 2020

Voir sur GitHub
 (4 commentaires) (0 réactions) (0 assignés)JavaScript (181 forks)batch import
discussionenhancementgood first issuehelp wantedproposal

Métriques du dépôt

Stars
 (8 453 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

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

Guide contributeur