Skip to content

Commit d57afda

Browse files
fubupc阿笠
authored and
阿笠
committed
Bugfix: fix regex mismatching empty space after sourceMappingURL issue.
For now, baseRegex mismatch empty space after <url> which lead to 'Cannot find SourceMap' problem.
1 parent cfad381 commit d57afda

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ var path = require("path");
88
var async = require("async");
99
var loaderUtils = require("loader-utils");
1010

11-
var baseRegex = "\\s*[@#]\\s*sourceMappingURL\\s*=\\s*(.*)",
11+
var baseRegex = "\\s*[@#]\\s*sourceMappingURL\\s*=\\s*([^\\s]*)",
1212
// Matches /* ... */ comments
1313
regex1 = new RegExp("/\\*"+baseRegex+"\\s*\\*/"),
1414
// Matches // .... comments

0 commit comments

Comments
 (0)