Skip to content

Commit 58febe4

Browse files
committed
fixed bug for imports
1 parent 58b00f2 commit 58febe4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ module.exports = function(content) {
2121
annotateUrls(tree);
2222

2323
imports.forEach(function(imp) {
24-
if(/^data:|^(https?:)?\/\//.test(imp.url)) {
24+
if(!loaderUtils.isUrlRequest(imp.url)) {
2525
result.push(JSON.stringify("@import url(" + imp.url + ")" + imp.media.join("") + ";"));
2626
} else {
2727
if(imp.media.length > 0) {
2828
result.push(JSON.stringify("@media " + imp.media.join("") + "{"));
2929
}
30-
result.push("require(" + JSON.stringify("!" + __filename + "!" + urlToRequire(imp.url)) + ")");
30+
result.push("require(" + JSON.stringify("!" + __filename + "!" + loaderUtils.urlToRequest(imp.url)) + ")");
3131
if(imp.media.length > 0) {
3232
result.push(JSON.stringify("}"));
3333
}

0 commit comments

Comments
 (0)