From 653bbdda41be6bd6b07734c843ff491a1672e880 Mon Sep 17 00:00:00 2001 From: Philipp Spiess Date: Tue, 3 Dec 2024 10:39:27 +0100 Subject: [PATCH 1/2] Update changelog and add test for absolute url rebasing --- CHANGELOG.md | 4 ++-- packages/@tailwindcss-node/src/urls.test.ts | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aace62b6ebf6..e6febe4f35af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed -- Ensure absolute `url()`s inside imported CSS files are not rebased when using `@tailwindcss/vite` +- Ensure absolute `url()`s inside imported CSS files are not rebased when using `@tailwindcss/vite` ([#15275](https://github.com/tailwindlabs/tailwindcss/pull/15275)) - Fix issues with dev servers using Svelte 5 with the Vite plugin ([#15274](https://github.com/tailwindlabs/tailwindcss/issues/15274)) - Fix resolution of imported CSS files in Vite SSR builds ([#15279](https://github.com/tailwindlabs/tailwindcss/issues/15279)) - Ensure other plugins can run after `@tailwindcss/postcss` ([#15273](https://github.com/tailwindlabs/tailwindcss/pull/15273)) @@ -18,7 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Parallelize parsing of individual source files ([#15270](https://github.com/tailwindlabs/tailwindcss/pull/15270)) -- Support Vite 6 in the Vite plugin ([#15274](https://github.com/tailwindlabs/tailwindcss/issues/15274)) +- Support Vite 6 with Svelte 5 in the Vite plugin ([#15274](https://github.com/tailwindlabs/tailwindcss/issues/15274)) ## [4.0.0-beta.4] - 2024-11-29 diff --git a/packages/@tailwindcss-node/src/urls.test.ts b/packages/@tailwindcss-node/src/urls.test.ts index d6d9fcb3a3d6..3378e45edbdc 100644 --- a/packages/@tailwindcss-node/src/urls.test.ts +++ b/packages/@tailwindcss-node/src/urls.test.ts @@ -18,6 +18,12 @@ test('URLs can be rewritten', async () => { background: url('./image.jpg'); background: url("./image.jpg"); + /* Absolute URLs: ignored */ + background: url(/image.jpg); + background: url(/foo/image.jpg); + background: url('/image.jpg'); + background: url("/image.jpg"); + /* External URL: ignored */ background: url(http://example.com/image.jpg); background: url('http://example.com/image.jpg'); @@ -99,6 +105,10 @@ test('URLs can be rewritten', async () => { background: url(./foo/image.jpg); background: url('./foo/bar/image.jpg'); background: url("./foo/bar/image.jpg"); + background: url(/image.jpg); + background: url(/foo/image.jpg); + background: url('/image.jpg'); + background: url("/image.jpg"); background: url(http://example.com/image.jpg); background: url('http://example.com/image.jpg'); background: url("http://example.com/image.jpg"); From 9e504d57d4d675450ed279bddd5b495deea13b47 Mon Sep 17 00:00:00 2001 From: Philipp Spiess Date: Tue, 3 Dec 2024 12:22:19 +0100 Subject: [PATCH 2/2] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e6febe4f35af..a8087a60e8c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Parallelize parsing of individual source files ([#15270](https://github.com/tailwindlabs/tailwindcss/pull/15270)) -- Support Vite 6 with Svelte 5 in the Vite plugin ([#15274](https://github.com/tailwindlabs/tailwindcss/issues/15274)) +- Support Vite 6 in the Vite plugin ([#15274](https://github.com/tailwindlabs/tailwindcss/issues/15274)) ## [4.0.0-beta.4] - 2024-11-29