Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ module.exports = function loader(content, map) {
return `" + escape(require(${loaderUtils.stringifyRequest(
this,
urlRequest
)})) + "${url.substr(idx)}`;
)}) + "${url.substr(idx)}") + "`;
}
urlRequest = url;
return `" + escape(require(${loaderUtils.stringifyRequest(
Expand Down
4 changes: 2 additions & 2 deletions test/urlTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,11 @@ describe('url', () => {
);
test(
'font face',
"@font-face { src: url(regular.woff) format('woff'), url(~truetype/regular.ttf) format('truetype') }",
"@font-face { src: url(regular.woff) format('woff'), url(~truetype/regular.ttf) format('truetype'), url('Mark Simonson - Proxima Nova Alt Regular-webfont.eot?#iefix') format('embedded-opentype'), url('webfont.svg#svgFontName') format('svg'), url('webfont.woff2?foo=bar') format('woff2'); }",
[
[
1,
"@font-face { src: url({./regular.woff}) format('woff'), url({truetype/regular.ttf}) format('truetype') }",
"@font-face { src: url({./regular.woff}) format('woff'), url({truetype/regular.ttf}) format('truetype'), url(\"{./Mark Simonson - Proxima Nova Alt Regular-webfont.eot}?#iefix\") format('embedded-opentype'), url({./webfont.svg}#svgFontName) format('svg'), url({./webfont.woff2?foo=bar}) format('woff2'); }",
'',
],
]
Expand Down