Skip to content

Commit c83823f

Browse files
committed
fix regexp for '@import url()'
1 parent bf33103 commit c83823f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/load.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,8 @@ var Loader = function (data) {
241241
var cssLocalDirname = cssLocalPath ? path.dirname(cssLocalPath) : options.path,
242242
commentRegexp = /\/\*([\s\S]*?)\*\//g,
243243
sourcesRegexps = [
244-
/(url[\s]*\([\s'"]*)(.+?)([\s'"]*\))/gi,
245244
/(@import[\s]*['"]?[\s]*)(.+?)([\s]*['"]?;)/gi,
246-
/(@import[\s]*url[\s]*\([\s'"]*)(.+?)([\s'"]*\))/gi
245+
/((?:@import[\s]*)?url[\s]*\([\s'"]*)(.+?)([\s'"]*\))/gi
247246
],
248247
urlPromises = [];
249248

0 commit comments

Comments
 (0)