An esbuild plugin that enables importing .pug and .jade templates directly in JavaScript/TypeScript builds. Current version is 0.0.8, with infrequent releases. Unlike generic loaders, it wraps the full Pug compiler, supporting all Pug features (includes, mixins, interpolation) and returns compiled HTML strings. Use with esbuild for server-side rendering or static site generation without a separate build step.
npm install esbuild-plugin-pugNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Registers the pug plugin with esbuild and demonstrates importing a .pug file as a function that returns HTML.
Use a separate watch mechanism or esbuild's built-in watch with onRebuild callback.
Fork the plugin or precompile templates manually if you need to customize Pug compiler options.
Precompile async templates separately or use a different plugin that supports esbuild's async plugins.
npm install --save-dev esbuild-plugin-pug
Change import: use pugPlugin() not pugPlugin
No dependency data recorded yet.