-
Notifications
You must be signed in to change notification settings - Fork 68
Open
Description
Setting up a simple example project:
//...
app.set('view engine', 'ejs');
app.set('views', __dirname + '/views');
app.set('layout', __dirname + '/views/layouts/default.ejs');
app.set('layout extractScript', true);
app.set('layout extractStyles', true);
//...When rendering a simple page, I was getting 'script' is not defined (Referring to <%- script %> in the layout file)
I found that the issue was that I set 'extractScript', and not 'extractScripts', but the error message is very cryptic for newcomers. Shouldn't it be something like:
"you need to set 'layout extractScripts' to true before using <%- script %>"
Not critical by any means, but it took me a while to find the typo. It would be nice to get that half an hour of my life back.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels