diff --git a/lib/ejs.js b/lib/ejs.js index b011424d..c9b104c5 100755 --- a/lib/ejs.js +++ b/lib/ejs.js @@ -611,6 +611,10 @@ Template.prototype = { if (opts.debug) { console.log(src); } + if (opts.compileDebug && opts.filename) { + src = src + '\n' + + '//# sourceURL=' + opts.filename + '\n'; + } try { if (opts.async) {