esbuild-plugin-twig
JSON →ESBuild plugin for compiling Twig templates during bundling. Current version 1.0.15, with a demonstrated one-off release cadence (last major hook). It leverages the `twig` npm package under the hood and accepts a user-provided Twig instance. Unlike generic template loaders, it directly integrates with ESBuild's pipeline and handles CJS and ESM modules. The plugin compiles `.twig` files from a source folder to a destination folder, and can be applied as an ESBuild plugin in Node.js environments. It ships with TypeScript definitions. Works with Node >=16, >=18, >=19, >=20.
Resources
packageesbuild-plugin-twig ↗
API endpoints
full doc /v1/registry/esbuild-plugin-twig