Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Babel Macro #150

Open
nick-at-hawkfish opened this issue Jan 27, 2020 · 3 comments
Open

Babel Macro #150

nick-at-hawkfish opened this issue Jan 27, 2020 · 3 comments
Labels
discussion enhancement good first issue help wanted proposal

Comments

@nick-at-hawkfish
Copy link

@nick-at-hawkfish nick-at-hawkfish commented Jan 27, 2020

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

@developit
Copy link
Owner

@developit developit commented Jan 29, 2020

Interesting! If it's not a huge undertaking I think that might be nice. The idea of it baking in the JSX pragma based on the path (like you've shown here) is nice.

@developit developit added discussion enhancement good first issue help wanted proposal labels Jan 29, 2020
@klvenky
Copy link

@klvenky klvenky commented Aug 27, 2020

Is this taken? I am pretty new to OSS and the repo. I am not sure where to start. Can someone help me out by pointing some resources?

@developit
Copy link
Owner

@developit developit commented Feb 5, 2021

Hi @klvenky - sorry for missing your question. Nobody has taken it yet, though I'm afraid I actually don't know where to start! I've never written or used a "babel macro" before. Maybe @nick-at-hawkfish knows?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion enhancement good first issue help wanted proposal
Projects
None yet
Development

No branches or pull requests

3 participants