diff --git a/index.js b/index.js index 77a4e6c..a3cbfca 100644 --- a/index.js +++ b/index.js @@ -45,7 +45,9 @@ module.exports = function (content) { .replace(new RegExp(escapeRegExp(pathSep) + '+', 'g'), pathSep); var html; - if (content.match(/^module\.exports/)) { + content = content.replace(/\n/g, ' '); + + if (content.match(/module\.exports/)) { var firstQuote = findQuote(content, false); var secondQuote = findQuote(content, true); html = content.substr(firstQuote, secondQuote - firstQuote + 1); diff --git a/package.json b/package.json index 6941aab..729c85d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ngtemplate-loader", - "version": "2.0.1", + "version": "2.0.2", "description": "Include AngularJS templates in the Webpack bundle and preload the template cache.", "main": "index.js", "scripts": {