From d57afda42346c46980049a7b246156f30f6ae399 Mon Sep 17 00:00:00 2001 From: fubupc Date: Sat, 25 Apr 2015 18:25:11 +0800 Subject: [PATCH] Bugfix: fix regex mismatching empty space after sourceMappingURL issue. For now, baseRegex mismatch empty space after which lead to 'Cannot find SourceMap' problem. --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index abbdc57..30cae6a 100644 --- a/index.js +++ b/index.js @@ -8,7 +8,7 @@ var path = require("path"); var async = require("async"); var loaderUtils = require("loader-utils"); -var baseRegex = "\\s*[@#]\\s*sourceMappingURL\\s*=\\s*(.*)", +var baseRegex = "\\s*[@#]\\s*sourceMappingURL\\s*=\\s*([^\\s]*)", // Matches /* ... */ comments regex1 = new RegExp("/\\*"+baseRegex+"\\s*\\*/"), // Matches // .... comments