Open
Description
Actually, in issue #4593, I provided Express the import
ed view engine instance.
I registered it as "Eta"
(".Eta"
internally), and Express did not use it for search.eta
(because it was only looking for the ".eta"
one), triggering the undesired automatic require
.
app.engine("Eta", Eta.renderFile);
console.log(app.engines); // { '.Eta': [Function: renderFile] }
app.set("view engine", "Eta");
function View(name, options) {
var opts = options || {};
this.defaultEngine = opts.defaultEngine;
this.ext = extname(name);
console.info("EXPRESS", [name, extname(name)]); // EXPRESS [ 'search.eta', '.eta' ]
this.name = name;
this.root = opts.root;
Maybe it should normalize the ext
to a single case?
Lines 293 to 307 in 5c4f3e7
Lines 52 to 88 in 5c4f3e7