Open mryarbles opened 7 years ago
This is the result of some console.logs I put in trying to figure out why this plugin is failing.
ejs-brunch ======================= ejs compile { data: '<p>Hello</p>', path: 'web/static/templates/template.ejs', map: undefined } ======================= ======================= ejs basePath web/static/templates/template.html.ejs [ 'web/static/templates/template.html.ejs' ] [TypeError: Path must be a string. Received undefined]
It turns out baseDir is coming up undefined for some reason. Handlebars-brunch works fine so I don't know why it's not finding the directory...
var baseDir = this.config.watched.find(d => parts.indexOf(d) > -1); console.log("baseDir:", baseDir); // "undefined"
This is where the problem is:
var parts = filePath.split(path.sep);
path.sep = "\" because I work on windows. But all of our project paths use "/" of course...
This is the result of some console.logs I put in trying to figure out why this plugin is failing.
It turns out baseDir is coming up undefined for some reason. Handlebars-brunch works fine so I don't know why it's not finding the directory...