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.

Possible to use with Pug instead of JSX?

See original GitHub issue

Was wondering if it would be possible to use some combination of Webpack loaders to precompile Preact components using Pug templates instead of JSX. Maybe something like this?

module: {
	rules: [{
		test: /\.(js|pug)$/,
		use: ["babel-loader", "pug-as-jsx"]

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

ForsakenHarmonycommented, Feb 28, 2018

Could always write a webpack loader yourself

developitcommented, Jul 13, 2017

I’m working on this. It’s not a pug -> jsx loader though, essentially it is compiling the pug template to a virtual Dom component.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to use pug with react instead of jsx? · Issue #2796 - GitHub
I believe this would allow us to precompile Pug templates into JSX, which can then be precompiled by the SPA specific loader. This...
Read more >
How to use Pug with React? - Stack Overflow
I see this question is quite old, but if you are still looking for the answer, then there is an official plugin for...
Read more >
[React + TypeScript + Pug] Workaround to replace JSX with Pug
Being a Pug aficionado it's normal to think about embedding Pug in React component instead of JSX. This post is about an issue...
Read more >
Why would you use Pug over something like React or ... - Quora
Many frameworks (Vue, React) you use with Pug, already have conditionals and case statements. Importing other files is also possible with ES6 and...
Read more >
Pug vs React | What are the differences? - StackShare
Pug - Robust, elegant, feature rich template engine for nodejs. React - A JavaScript library for building user interfaces.
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 Post

No results found

github_iconTop Related Hashnode Post

No results found