tailwindcss icon indicating copy to clipboard operation
tailwindcss copied to clipboard

fix(sources): alias order #tailwindcss/sources

Open Ti-webdev opened this issue 2 months ago โ€ข 2 comments

๐Ÿ”— 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

Ti-webdev avatar Nov 10 '25 15:11 Ti-webdev

Deploy request for nuxt-tailwindcss pending review.

Visit the deploys page to approve it

Name Link
Latest commit 555edd98e4ddf469c244dd69b247fd15b83e27dc

netlify[bot] avatar Nov 10 '25 15:11 netlify[bot]

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 the Tailwind CSS/sources alias is now properly assigned to the file, ensuring a streamlined process and eliminating confusion in potential definition overlaps.

what-the-diff[bot] avatar Nov 10 '25 15:11 what-the-diff[bot]