diff --git a/packages/playground/assets/__tests__/assets.spec.ts b/packages/playground/assets/__tests__/assets.spec.ts index 694d91709701d0..04ba14afa17272 100644 --- a/packages/playground/assets/__tests__/assets.spec.ts +++ b/packages/playground/assets/__tests__/assets.spec.ts @@ -99,6 +99,12 @@ describe('css url() references', () => { expect(await getBg('.css-url-quotes-base64-inline')).toMatch(match) }) + test('multiple urls on the same line', async () => { + const bg = await getBg('.css-url-same-line') + expect(bg).toMatch(assetMatch) + expect(bg).toMatch(iconMatch) + }) + if (isBuild) { test('preserve postfix query/hash', () => { expect(findAssetFile(/\.css$/, 'foo')).toMatch(`woff2?#iefix`) diff --git a/packages/playground/assets/css/css-url.css b/packages/playground/assets/css/css-url.css index 5caf72cf8be2e3..683305fa687b95 100644 --- a/packages/playground/assets/css/css-url.css +++ b/packages/playground/assets/css/css-url.css @@ -29,6 +29,11 @@ background: url('../nested/icon.png'); background-size: 10px; } + +.css-url-same-line { + background: url('/nested/asset.png') top right / 10px no-repeat, url('/icon.png') bottom right / 10px no-repeat; +} + /* urls inside comments should be ignored diff --git a/packages/playground/assets/index.html b/packages/playground/assets/index.html index 808802ce3740fc..eeed653201796c 100644 --- a/packages/playground/assets/index.html +++ b/packages/playground/assets/index.html @@ -47,6 +47,11 @@