File tree 2 files changed +8
-1
lines changed
2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,13 @@ module.exports = function(content) {
31
31
var uriRegExp = / % C S S U R L \[ % ( .* ?) % \] C S S U R L % / g;
32
32
css = css . replace ( uriRegExp , function ( str ) {
33
33
var match = / ^ % C S S U R L \[ % ( .* ?) % \] C S S U R L % $ / . exec ( str ) ;
34
+ var idx = match [ 1 ] . indexOf ( "?" ) ;
35
+ if ( idx < 0 ) idx = match [ 1 ] . indexOf ( "#" ) ;
36
+ if ( idx >= 0 ) {
37
+ // in cases like url('webfont.eot?#iefix')
38
+ var url = JSON . parse ( "\"" + match [ 1 ] . substr ( 0 , idx ) + "\"" ) ;
39
+ return "\"+require(" + JSON . stringify ( urlToRequire ( url ) ) + ")+\"" + match [ 1 ] . substr ( idx ) ;
40
+ }
34
41
var url = JSON . parse ( "\"" + match [ 1 ] + "\"" ) ;
35
42
return "\"+require(" + JSON . stringify ( urlToRequire ( url ) ) + ")+\"" ;
36
43
} ) ;
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " css-loader" ,
3
- "version" : " 0.6.1 " ,
3
+ "version" : " 0.6.2 " ,
4
4
"author" : " Tobias Koppers @sokra" ,
5
5
"description" : " css loader module for webpack" ,
6
6
"dependencies" : {
You can’t perform that action at this time.
0 commit comments