question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

General JSX Transformer

See original GitHub issue

Great project! I made a general JSX transformer, babel-plugin-transform-jsx if you are interested in recommending that and avoiding /* @jsx h */ comments and even repetitive imports.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:4
  • Comments:13 (8 by maintainers)

github_iconTop GitHub Comments

3reactions
gpoitchcommented, Dec 29, 2016

I just had a PR merged into webpack to eliminate that extra file https://github.com/webpack/webpack/pull/3597

So in the next webpack release you can just do:

new ProvidePlugin({
  jsx: ['preact', 'h']
})
1reaction
felipenmouracommented, Nov 23, 2017

Just to leave it here. I used this to make it work:

{ "pragma": "require('preact').h" }
Read more comments on GitHub >

github_iconTop Results From Across the Web

Introducing the New JSX Transform – React Blog
When you use JSX, the compiler transforms it into React function calls that the browser can understand. The old JSX transform turned JSX...
Read more >
General JSX Transformer · Issue #178 · preactjs/preact - GitHub
Nice work. Any chance you'd be interested in making the property names configurable? Preact VNodes use nodeName instead of elementName to ...
Read more >
How to Use New JSX Transform IN REACT - Aspire Blogs
New JSX Transform in React blog presents what and why new JSX Transform use, JSX advantages, disadvantages and JSX hook examples.
Read more >
JSX in Depth | React
The Transform #. JSX transforms from an XML-like syntax into native JavaScript. XML elements and attributes are transformed into function calls and objects, ......
Read more >
New JSX Transform - Hacker News
We started talking about the possibility of delivering the UI independently of the GraphQL schema by using an existing REST API, and the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found