File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
Expand file tree Collapse file tree 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) {
3131 var uriRegExp = / % C S S U R L \[ % ( .* ?) % \] C S S U R L % / g;
3232 css = css . replace ( uriRegExp , function ( str ) {
3333 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+ }
3441 var url = JSON . parse ( "\"" + match [ 1 ] + "\"" ) ;
3542 return "\"+require(" + JSON . stringify ( urlToRequire ( url ) ) + ")+\"" ;
3643 } ) ;
Original file line number Diff line number Diff line change 11{
22 "name" : " css-loader" ,
3- "version" : " 0.6.1 " ,
3+ "version" : " 0.6.2 " ,
44 "author" : " Tobias Koppers @sokra" ,
55 "description" : " css loader module for webpack" ,
66 "dependencies" : {
You can’t perform that action at this time.
0 commit comments