pugjs / pug

Pug – robust, elegant, feature rich template engine for Node.js
https://pugjs.org
21.7k stars 1.95k forks source link

compileFileClient name option is not working #3418

Closed meircarlos closed 1 year ago

meircarlos commented 1 year ago

Pug Version: 3.0.2

Node Version: 18

Input JavaScript Values

const templatePath = `${__dirname}/templates/test-report.html.pug`;
const options = { name: 'testReportTemplate' };

const compiledTemplate = pug.compileFileClient(templatePath, options)

The expected compiledTemplate should have a function named 'testReportTemplate' however it's returning a function named 'pug_attr'.

It happens with any template.

meircarlos commented 1 year ago

Never mind, I thought only one function was meant to be returned