@@ -77,17 +77,13 @@ var parserPlugin = postcss.plugin("css-loader-parser", function(options) {
7777exports [ exportName ] = replaceImportsInString ( exports [ exportName ] ) ;
7878} ) ;
7979
80- function processNode ( item , isValue ) {
80+ function processNode ( item ) {
8181switch ( item . type ) {
8282case "value" :
83- item . nodes . forEach ( function ( node ) {
84- processNode ( node , true ) ;
85- } ) ;
83+ item . nodes . forEach ( processNode ) ;
8684break ;
8785case "nested-item" :
88- item . nodes . forEach ( function ( node ) {
89- processNode ( node ) ;
90- } ) ;
86+ item . nodes . forEach ( processNode ) ;
9187break ;
9288case "item" :
9389var importIndex = imports [ "$" + item . name ] ;
@@ -100,18 +96,7 @@ var parserPlugin = postcss.plugin("css-loader-parser", function(options) {
10096item . stringType = "" ;
10197delete item . innerSpacingBefore ;
10298delete 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 ;
115100item . url = "___CSS_LOADER_URL___" + urlItems . length + "___" ;
116101urlItems . push ( {
117102url : url
@@ -124,9 +109,7 @@ var parserPlugin = postcss.plugin("css-loader-parser", function(options) {
124109css . walkDecls ( function ( decl ) {
125110var values = Tokenizer . parseValues ( decl . value ) ;
126111values . nodes . forEach ( function ( value ) {
127- value . nodes . forEach ( function ( node ) {
128- processNode ( node ) ;
129- } ) ;
112+ value . nodes . forEach ( processNode ) ;
130113} ) ;
131114decl . value = Tokenizer . stringifyValues ( values ) ;
132115} ) ;
0 commit comments