@@ -77,17 +77,13 @@ var parserPlugin = postcss.plugin("css-loader-parser", function(options) {
77
77
exports [ exportName ] = replaceImportsInString ( exports [ exportName ] ) ;
78
78
} ) ;
79
79
80
- function processNode ( item , isValue ) {
80
+ function processNode ( item ) {
81
81
switch ( item . type ) {
82
82
case "value" :
83
- item . nodes . forEach ( function ( node ) {
84
- processNode ( node , true ) ;
85
- } ) ;
83
+ item . nodes . forEach ( processNode ) ;
86
84
break ;
87
85
case "nested-item" :
88
- item . nodes . forEach ( function ( node ) {
89
- processNode ( node ) ;
90
- } ) ;
86
+ item . nodes . forEach ( processNode ) ;
91
87
break ;
92
88
case "item" :
93
89
var importIndex = imports [ "$" + item . name ] ;
@@ -100,18 +96,7 @@ var parserPlugin = postcss.plugin("css-loader-parser", function(options) {
100
96
item . stringType = "" ;
101
97
delete item . innerSpacingBefore ;
102
98
delete item . innerSpacingAfter ;
103
- var url ;
104
-
105
- if ( isValue ) {
106
- if ( loaderUtils . isUrlRequest ( url , options . root ) && options . mode === "global" ) {
107
- url = loaderUtils . urlToRequest ( item . url , options . root ) ;
108
- } else {
109
- url = item . url ;
110
- }
111
- } else {
112
- url = item . url ;
113
- }
114
-
99
+ var url = item . url ;
115
100
item . url = "___CSS_LOADER_URL___" + urlItems . length + "___" ;
116
101
urlItems . push ( {
117
102
url : url
@@ -124,9 +109,7 @@ var parserPlugin = postcss.plugin("css-loader-parser", function(options) {
124
109
css . walkDecls ( function ( decl ) {
125
110
var values = Tokenizer . parseValues ( decl . value ) ;
126
111
values . nodes . forEach ( function ( value ) {
127
- value . nodes . forEach ( function ( node ) {
128
- processNode ( node ) ;
129
- } ) ;
112
+ value . nodes . forEach ( processNode ) ;
130
113
} ) ;
131
114
decl . value = Tokenizer . stringifyValues ( values ) ;
132
115
} ) ;
0 commit comments