tailwindlabs / tailwindcss

A utility-first CSS framework for rapid UI development.
https://tailwindcss.com/
MIT License
83.38k stars 4.22k forks source link

[v4] Resolve `@import` or `@source` from `vite.resolve.alias` #15159

Open TiBianMod opened 1 day ago

TiBianMod commented 1 day ago

What version of Tailwind CSS are you using?

tailwindcss: v4.0.0-beta.2 @tailwindcss/vite: v4.0.0-beta.2 @tailwindcss/postcss: v4.0.0-beta.2

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

vite: v5.4.11

What browser are you using?

Chrome, Safari, etc

What operating system are you using?

macOS

Reproduction URL

https://github.com/TiBianMod/vite-tailwindcss

Reproduction contains 3 Branches

Describe your issue

  VITE v5.4.11  ready in 403 ms

  ➜  Local:   http://localhost:5173/
  ➜  Network: use --host to expose
  ➜  press h + enter to show help

7:51:44 PM [vite] Internal server error: Can't resolve '#resolveThisCss' in '/Users/user/Code/vite-tailwindcss/src'
  Plugin: @tailwindcss/vite:generate:serve
philipp-spiess commented 16 hours ago

Hey! Agree this is an issue right now. We're already tracking this as https://github.com/tailwindlabs/tailwindcss/issues/15047 so I'm going to merge the two issues and close this one.

philipp-spiess commented 13 hours ago

Going to reopen this one as #15047 does not repro for me so the fix will not work for the other issue. This issue is something we can fix, though. Looking into it 👀