Closed lcxfs1991 closed 5 years ago
I think you can achieve this purpose by setting proper path
and relPath
, so I'll close the PR, feel free to reopen it if necessary :-)
Actually if we allow users to set absolute path, this is more understandable.
@int64ago
The absolute path of template may lead to confusion if mixing with relative path in one project.
If the user use absolute path, root path won't apply. I think that is a solution.
This's what makes confusion.
How about the following example:
At the top of project:
app.use(views('/path/of/views', {
// ...
}));
In one file:
ctx.render('path/of/template');
In another file:
ctx.render('/path/of/template');
It's strange and may cause bugs.
@int64ago Please check