Use js templating engine with Workers / Pages Functions? e.g., nunjucks

Any one has success using js templating engine like nunjucks with Workers / Pages Functions?

Seeing such error when using nunjucks in Pages Functions:
## EvalError: Code generation from strings disallowed for this context

From my understanding, eval() is disallowed in Workers / Pages Functions, but all templating engines use eval(). So we can’t use any existing templating engine for Workers / Pages Functions. Correct?

Mustache works.

Indeed! It works!

Thanks a lot. Saved my day!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.