Possible to use with Pug instead of JSX?
See original GitHub issueWas 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:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Could always write a webpack loader yourself
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.