marlonmarcello / vite-plugin-pug

Pug template engine plugin for Vite.
MIT License
1 stars 0 forks source link

So you've succeeded! Can we use it then? ) #2

Open davay42 opened 3 years ago

davay42 commented 3 years ago

Hey. I've seen your case with pug at vite issues. I'm searching for exactly that! Adding some html templating to vite is another important puzzle piece for the great all-in-one web production tooling. All other systems make you drown in the config and terminal. Vite is different. )

I'm trying to implement your solution in my project. Just changing index.html to index.pug with your boilerplate code still gives me an empty html-body-pre page... And pug in old index.html gives just plain text in the browser. Do we need to add all generated pages as entry points or smth? Or it's just for cases with diff scripts for diff pages? It may evolve in a pretty complex structure ) Let's try! )

marlonmarcello commented 3 years ago

@DeFUCC thank you! And unfortunately Vite still has issues with templating. Not sure which issue you saw on Vite but this is the link to it

I am still waiting on an answer from them. Unfortunately it seems that templating is something that is still a second hand feature on these tools.

I also made a plugin for snowpack and that is working if it interests you at all.

davay42 commented 3 years ago

I'm playing with your code and came to some working results. It's far not perfect, but workable. ) I've tried to switch from vite to 11ty or hexo, but it's not easy! From there it's harder to build all the fun vue sfc system that is crucial for me. And with rather complex js onboard it comes to those 11ty+webpack solutions that I find too complicated. Seems like Vitepress is more suitable for the case. But it's evolving too slowly

marlonmarcello commented 3 years ago

@DeFUCC I was shut down. I think I will unfortunately discontinue this plugin and keep using snowpack. https://github.com/vitejs/vite/issues/1861#issuecomment-772746928