pugjs / pug-loader

Pug loader module for Webpack
MIT License
425 stars 119 forks source link

esbuild alternative #136

Open bauer01 opened 3 years ago

bauer01 commented 3 years ago

Hi, is there any option to use this with esbuild or it's webpack only?

hishammalik commented 2 years ago

Any feedback? Or should we consider translating code from pug to jsx?

ChildishGiant commented 2 years ago

There's esbuild-plugin-pug made by @adamjberg (although not on their github for some reason)

adamjberg commented 2 years ago

Oops, I don't follow my Github notifications very well. As @ChildishGiant mentioned I've started a plugin for this: https://github.com/adamjberg/esbuild-plugin-pug. This is my first npm package so I have no idea what I'm doing. I've cleaned it up a bit so should have basic details on how to use and correctly link to the repo.

@bauer01 give that a try and let me know if you run in to any issues.

ymulenll commented 1 year ago

I also created @ymulenll/esbuild-plugin-pug, it's based on esbuild-plugin-pug, but instead of returning HTML, it returns the compiled function. This allows you to pass input data to the template, and it also supports includes in your templates.