-
Notifications
You must be signed in to change notification settings - Fork 956
Description
Environment
macos
node 24
pnpm 10.17.1
Is this bug related to Nuxt or Vue?
Nuxt
Package
v4.x
Version
v4.1.0
Reproduction
Import ui from node_module library to define app.config.ts
Description
Hello, I'm trying to configure nuxt/ui in 2 different projects.
Both of them install a private library which contains :
- various custom components
- the root.css file containing all the nuxt/ui variables a
- a JSON file with the
uiobject used to configure nuxt/ui.
Vue 3 + Vite ✅
I can import the JSON file in my vite.config.ts and tailwind will scan correctly the file and create the styles associated with my configuration (stuff like disabled:bg-[var(--ui-bg-muted)]).
Nuxt ❌
I added the following in the app.config.ts file:
import uiConfig from '@private/my_package/nuxtui.config.json'
export default defineAppConfig(uiConfig)The classes are applied to the components but the style is not created by tailwind so for any class where I use this format XXX-[var(--XXX)] the style does not work.
I've tried adding tailwind's @source in my main.css file to force scan of my config (that I exported as json and ts) but same result.
Am I missing something ?
Thanks for your help
Additional context
No response