Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect work of url() in css file when using vite.js #8966

Closed
Semdevmaster opened this issue Jul 27, 2022 · 1 comment · Fixed by #8971
Closed

Incorrect work of url() in css file when using vite.js #8966

Semdevmaster opened this issue Jul 27, 2022 · 1 comment · Fixed by #8971
Assignees

Comments

@Semdevmaster
Copy link

What version of Tailwind CSS are you using?

"tailwindcss": "3.1.6"

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

"vite": "3.0.3"

What version of Node.js are you using?

v16.16.0

What browser are you using?

Any

What operating system are you using?

Windows (WSL2)

Reproduction URL
https://codesandbox.io/s/vite-tailwind-bug-jm7w9h

Describe your issue

If vite.config.js entry point is a style file, for example, for a classic backend, then the url() in css files are not processed.
But if I comment out the tilewindcss plugin in the postcss.config.js file, then everything works fine.

Result with tailwindcss: (not processed)

.test{background-image:url(img.svg)}

Result without tailwindcss: (processed)

.test{background-image:url(/img-8dac5379.svg)}
@thecrypticace
Copy link
Contributor

Hey, thanks for the bug report! This has to be one of the strangest bugs I've tracked down 😅

I've merged the fix in and it'll be available in our next tagged release — in the mean time you can try it out with our insiders build once it's published (should be in a few minutes): npm install tailwindcss@insiders

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants