Skip to content

Conversation

@antfu
Copy link
Member

@antfu antfu commented Oct 31, 2025

πŸ”— Linked issue

Resolves #4951

Peered with @benjamincanac

❓ 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

Fixes the Vite plugin where theme files were incorrectly shipped inside .nuxt/ on NPM (#build/ui.css import was not working). They are now properly generated as real files that Tailwind CSS can read, ensuring custom theme colors and user configuration work correctly.

Since theme template files are written on disk, you have to update your tsconfig.node.json alias:

{
  "compilerOptions": {
    "paths": {
      "#build/ui": [
-       "./node_modules/@nuxt/ui/.nuxt/ui"
+       "./node_modules/.nuxt-ui/ui"
      ]
    }
  }
}

πŸ“ Checklist

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

@antfu antfu requested a review from benjamincanac as a code owner October 31, 2025 11:28
@github-actions github-actions bot added the v4 #4488 label Oct 31, 2025
@benjamincanac benjamincanac changed the title fix(vite): write templates fix(vite): write theme templates Oct 31, 2025
@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 31, 2025

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

commit: 29b27be

@benjamincanac
Copy link
Member

Thanks a lot @antfu! 😊

@benjamincanac benjamincanac merged commit 411ebcc into v4 Oct 31, 2025
16 checks passed
@benjamincanac benjamincanac deleted the fix/write-templates branch October 31, 2025 13:46
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.

Extending colors does not work with Vite plugin in Vue.js projects

3 participants