Skip to content

Conversation

@benjamincanac
Copy link
Member

@benjamincanac benjamincanac commented Nov 20, 2025

πŸ”— Linked issue

Resolves #5487, resolves #5501

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 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

When Prettier or Tailwind CSS IntelliSense reads a CSS file that imports @nuxt/ui, they fail to resolve the #build/ui.css import from src/runtime/index.css.

This virtual file is dynamically generated for Nuxt and Vite based on theme configuration, but Prettier and IntelliSense don't have access to Vite's alias resolution.

This PR adds a static alias using Node.js subpath imports so tooling can resolve it via standard module resolution.

Runtime (Nuxt/Vite) continues using dynamic resolution, while tooling uses the static fallback. The static file is built at package publish time with default theme configuration, so custom themes won't be reflected in IntelliSense. It's not perfect but better than nothing for now.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 20, 2025

npm i https://pkg.pr.new/@nuxt/ui@5499

commit: 6ceed3b

@benjamincanac benjamincanac changed the title chore(deps): put back #build/ui.css alias fix(module): put back #build/ui.css alias Nov 21, 2025
@benjamincanac benjamincanac marked this pull request as ready for review November 21, 2025 09:46
@benjamincanac benjamincanac merged commit d9aadc7 into v4 Nov 21, 2025
16 checks passed
@benjamincanac benjamincanac deleted the fix/5487 branch November 21, 2025 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v4 #4488

Projects

None yet

Development

Successfully merging this pull request may close these issues.

version 4.2.0 cause tailwind CSS intelliSense not work Compatibility Issue: Cannot resolve Nuxt UI's #build/ui.css alias

2 participants