?url import of css file fails, but straight import of css file with same filepath works
Within my tanstack start project I've followed the same setup as displayed in the start basic example. However when calling a
?url
import I get the following error in console:
18 Replies
ugly-tanOP•12mo ago
The above only seems to happen when using the
@tailwindcss/vite
pluginitchy-amethyst•12mo ago
can you please provide a minimal complete example by forking one of the existing examples on stackblitz?
ugly-tanOP•12mo ago
Oh for sure!
ugly-tanOP•12mo ago
@Manuel Schiller https://stackblitz.com/edit/tanstack-router-qojcz1
Jesse Koldewijn
StackBlitz
Router Start Basic Example (forked) - StackBlitz
Run official live example code for Router Start Basic, created by Tanstack on StackBlitz
ugly-tanOP•12mo ago
Although stackblitz doesn't seem to allow native binding like the oxide engine inside tailwind v4 (which is where the above mentioned plugin is necessary for)
itchy-amethyst•12mo ago
i'll run it locally
so which route does produce this error?
ugly-tanOP•12mo ago
I was trying to just add the tailwind css as a url onto the __root route
itchy-amethyst•12mo ago
so this is not there yet?
what do I have to do?
ugly-tanOP•12mo ago
The code for it would be there, but somewhere within tanstack's handling of vite it seems to provide a incorrect output for the ?url import
itchy-amethyst•12mo ago
the root route does not import that css though?
oh it imports app.css
ugly-tanOP•12mo ago
yes
which is a tailwindcss v4 entry file
itchy-amethyst•12mo ago
ok but I don't see the error you pasted in your first message
ah in the browser console
now I got it
sorry
ugly-tanOP•12mo ago
yes, sorry should have clarified!
itchy-amethyst•12mo ago
it looks like this is a general tailwind issue? https://github.com/tailwindlabs/tailwindcss/issues/14558#issuecomment-2388522405
GitHub
[v4] Something has broken since alpha.15, causing imports in CSS fi...
What version of Tailwind CSS are you using? v4.0.0-alpha.25 What build tool (or framework if it abstracts the build tool) are you using? vite 5.4.8 What version of Node.js are you using? bun 1.1.27...
itchy-amethyst•12mo ago
if you downgrade to
4.0.0-alpha.14
it worksharsh-harlequin•12mo ago
4.0.0-alpha.15 works

harsh-harlequin•12mo ago

itchy-amethyst•11mo ago
this is now fixed
https://github.com/tailwindlabs/tailwindcss/issues/14558
GitHub
[v4] Something has broken since alpha.15, causing imports in CSS fi...
What version of Tailwind CSS are you using? v4.0.0-alpha.25 What build tool (or framework if it abstracts the build tool) are you using? vite 5.4.8 What version of Node.js are you using? bun 1.1.27...