Skip to content

Commit 0b65e24

Browse files
Vite: Don't rebase absolute url()
1 parent e9426d0 commit 0b65e24

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10-
- Nothing yet!
10+
### Fixed
11+
12+
- Ensure absolute `url()`s inside imported CSS files are not rebased when using `@tailwindcss/vite`
1113

1214
## [4.0.0-beta.4] - 2024-11-29
1315

packages/@tailwindcss-node/src/urls.ts

+2
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ export async function rewriteUrls({
5151
let promises: Promise<void>[] = []
5252

5353
function replacerForDeclaration(url: string) {
54+
if (url[0] === '/') return url
55+
5456
let absoluteUrl = path.posix.join(normalizePath(base), url)
5557
let relativeUrl = path.posix.relative(normalizePath(root), absoluteUrl)
5658

0 commit comments

Comments
 (0)