diff --git a/lib/ejs.js b/lib/ejs.js index c65354c8..f67e5db7 100755 --- a/lib/ejs.js +++ b/lib/ejs.js @@ -610,6 +610,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) {