tailwindcss/packages
Robin Malfait 685c19e266
Fix issue around resolving paths in @tailwindcss/vite (#19947)
This PR fixes an issue when using `@tailwindcss/vite` and you're trying
to resolve paths. In the latest 4.2.3 release, we added support for
following the vite `aliases` option.

However, some people run into issues because if you just use `@` as an
alias then using `@tailwindcss/typography` wouldn't resolve because it's
a package, and not something local.

With this PR we fix that by making sure that Vite's resolver can
actually resolve to an absolute path. If not, then we fallback to the
resolving that happens in `@tailwindcss/node`.

Fixes: #19946

## Test plan

1. Added an integration test that reproduces this issue, and is now
solved
2. Tested it on a reproduction provided in the corresponding issue

Before:
<img width="1694" height="1856" alt="image"
src="https://github.com/user-attachments/assets/c50f7104-78b3-476d-9e60-0c83e0976a5c"
/>


After:
<img width="1694" height="1856" alt="image"
src="https://github.com/user-attachments/assets/44ea0e3b-f60f-479f-a4a1-203a6230475b"
/>
2026-04-21 14:11:46 +02:00
..
@tailwindcss-browser 4.2.3 (#19944) 2026-04-20 22:32:52 +02:00
@tailwindcss-cli 4.2.3 (#19944) 2026-04-20 22:32:52 +02:00
@tailwindcss-node 4.2.3 (#19944) 2026-04-20 22:32:52 +02:00
@tailwindcss-postcss Fix issue around resolving paths in @tailwindcss/vite (#19947) 2026-04-21 14:11:46 +02:00
@tailwindcss-standalone 4.2.3 (#19944) 2026-04-20 22:32:52 +02:00
@tailwindcss-upgrade 4.2.3 (#19944) 2026-04-20 22:32:52 +02:00
@tailwindcss-vite Fix issue around resolving paths in @tailwindcss/vite (#19947) 2026-04-21 14:11:46 +02:00
@tailwindcss-webpack 4.2.3 (#19944) 2026-04-20 22:32:52 +02:00
internal-example-plugin Prefix internal modules with internal-* (#14074) 2024-07-29 10:58:07 -04:00
tailwindcss 4.2.3 (#19944) 2026-04-20 22:32:52 +02:00
tsconfig.base.json Improve debug logs (#15303) 2024-12-11 15:27:20 +01:00