Skip to content

[4 alpha] breaks the default Vite url(...) references in imported CSS files. #14784

Closed
@slavarazum

Description

@slavarazum

What version of Tailwind CSS are you using?

For example: alpha.29 (latest)

What build tool (or framework if it abstracts the build tool) are you using?

For example: Vite 5.4.10 (latest)

What version of Node.js are you using?

For example: v20.9.0

What browser are you using?

Mainly Safari, however it's not related to the issue 🙃

What operating system are you using?

MacOS

Reproduction URL

https://github.com/slavarazum/tailwind4-alpha-vite/

Describe your issue

Vite provides @import inline and rebasing for CSS.
I'm trying to import font from the Fontsource library: https://fontsource.org/fonts/nunito which references font files using url(...).

As a result we have such rebased urls:
CleanShot 2024-10-24 at 17 32 22@2x

After installing Tailwind, importing it, and enabling the Vite plugin, the URLs remain with the default related paths:
CleanShot 2024-10-24 at 17 35 46@2x

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions