Skip to content

Commit

Permalink
Vite: Don't rebase absolute url()
Browse files Browse the repository at this point in the history
  • Loading branch information
philipp-spiess committed Dec 2, 2024
1 parent e9426d0 commit 0b65e24
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

- Nothing yet!
### Fixed

- Ensure absolute `url()`s inside imported CSS files are not rebased when using `@tailwindcss/vite`

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

Expand Down
2 changes: 2 additions & 0 deletions packages/@tailwindcss-node/src/urls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ export async function rewriteUrls({
let promises: Promise<void>[] = []

function replacerForDeclaration(url: string) {
if (url[0] === '/') return url

let absoluteUrl = path.posix.join(normalizePath(base), url)
let relativeUrl = path.posix.relative(normalizePath(root), absoluteUrl)

Expand Down

0 comments on commit 0b65e24

Please sign in to comment.