diff --git a/index.js b/index.js index cb1991f72..e7a1fde30 100644 --- a/index.js +++ b/index.js @@ -31,6 +31,7 @@ exports.find = function (src, opts) { if (!opts) opts = {}; var word = opts.word === undefined ? 'require' : opts.word; if (typeof src !== 'string') src = String(src); + src = src.replace(/^#![^\n]*\n/, ''); function isRequire (node) { var c = node.callee;