Module breaks when changing default extension
Closed this issue · 1 comments
matthew-dean commented
With ejs, you can change the default extension for ejs templates like this:
app.set('view engine', 'html');
app.engine('html', ejs.renderFile);
Pages without partials work. However, this breaks in express-partials, with the following error.
Cannot find module 'html'
at Function.Module._resolveFilename (module.js:338:15)
matthew-dean commented
Ah, never mind, fixed with:
app.set('view engine', 'html');
app.engine('html', ejs.renderFile);
partials.register('.html',ejs.render);