fix(sources): alias order #tailwindcss/sources
๐ Linked issue
https://github.com/tailwindlabs/tailwindcss/issues/18555 https://github.com/nuxt/nuxt/issues/32575
โ Type of change
- [ ] ๐ Documentation (updates to the documentation or readme)
- [x] ๐ Bug fix (a non-breaking change that fixes an issue)
- [ ] ๐ Enhancement (improving an existing functionality)
- [ ] โจ New feature (a non-breaking change that adds functionality)
- [ ] ๐งน Chore (updates to the build process or auxiliary tools and libraries)
- [ ] โ ๏ธ Breaking change (fix or feature that would cause existing functionality to change)
๐ Description
Fixed alias resolution order for #tailwindcss and #tailwindcss/sources.
Problem:
When importing #tailwindcss/sources, some module resolvers (like Vite) would try to resolve it as <path-to-#tailwindcss>/sources instead of using the dedicated alias, resulting in errors like:
ENOTDIR: not a directory, open '/path/to/main.css/sources'
Solution:
Reordered alias definitions to register the more specific #tailwindcss/sources before the generic #tailwindcss alias. This ensures that the resolver matches the full path first before attempting substring matches.
Changes:
- Swapped the order of alias registration in
src/import-css.ts
Deploy request for nuxt-tailwindcss pending review.
Visit the deploys page to approve it
| Name | Link |
|---|---|
| Latest commit | 555edd98e4ddf469c244dd69b247fd15b83e27dc |
PR Summary
-
Consistency Update for Tailwind CSS Alias Definition
The alias definition for
Tailwind CSS, a utility-first CSS framework for rapidly building custom user interfaces, has been updated for consistent use. Specifically, the modified version of theTailwind CSS/sourcesalias is now properly assigned to the file, ensuring a streamlined process and eliminating confusion in potential definition overlaps.