Closed mjamado closed 6 years ago
@mjamado would love a PR + tests for this. great point.
I'll try, but I can't promise (callback won't work either - I'm so sorry for this pun).
If anyone lands here, one workaround is to just create the file structure on disk anyway, with empty pug files. Highly ineffective, but gets the job done.
Published as v3.6.0 to npm, thanks @mjamado.
The documentation is missing - or at least misleading - on "Custom Rendering (e.g. from a MongoDB database)".
One would expect that, by providing the
render
function in the configuration object, the template would be rendered by that function, period. However, the flow of a send goes throughrenderAll
, which checks if there's real files on disk.This is not documented.
Note that I'm not suggesting the documentation should change; what I'm suggesting is that the behaviour changes completely: if a custom render function is provided,
renderAll
shouldn't check for files at all.