Include resolution in Pug 3.x remains unrestricted relative to template directory
0 reputation · 15 Dec 2024, 10:54 UTC
Pug 3.x resolves include and extends relative to the template file’s directory by default. The goal is to understand the compatibility boundary of that resolution when templates are placed in a publicly served directory.
The documented behavior was retained for flexibility and was not revised to enforce a stricter basedir scope. This leaves an unresolved decision about whether relative resolution should be allowed to reach outside the template folder and what the safe default is for production use.
Is the current default considered intentional and stable across Pug 3.x? Does an explicit basedir change resolution semantics in a backward-compatible way? What configuration boundary prevents a public template from including private files?