\n\nFrom what I understand, according to the error logged, the issue is caused by the resulting css tree having nested `@source` declarations.\n\n### Additional context\n\nI'm working on migrating an existing website that was built using Bootstrap (lol) and I'd like to use layers to ensure the newer css gets a higher priority than the old one.\n\nUsing `@import \"tailwindcss\" layer(tailwindcss);` results in all the tailwind stuff being scoped to the `tailwindcss` layer (eg. `tailwindcss.theme`, `tailwindcss.base`…).\n\nHowever, when I try to do the same for `@import \"@nuxt/ui\"` I get the previously mentioned error.\n\nI've tried using both the same and a different layer name than the one I use for tailwind but I still get the error.\n\n### Logs\n\n```shell-script\nERROR Pre-transform error: @source cannot be nested. 12:42:31 PM\n Plugin: @tailwindcss/vite:generate:serve\n File: /project/workspace/app/assets/css/main.css\n```",[3020,3023,3026],{"name":3021,"color":3022},"bug","d73a4a",{"name":3024,"color":3025},"v3","49DCB8",{"name":3027,"color":3028},"triage","ffffff",4503,"nuxt","ui","open","`@import \"@nuxt/ui\" layer(layer-name);` not working","2025-07-11T13:35:06Z","https://github.com/nuxt/ui/issues/4503",0.6393495,{"description":3038,"labels":3039,"number":3042,"owner":3030,"repository":3031,"state":3043,"title":3044,"updated_at":3045,"url":3046,"score":3047},"### Environment\n\n------------------------------\n- Operating System: Darwin\n- Node Version: v24.2.0\n- Nuxt Version: 3.17.5\n- CLI Version: 3.25.1\n- Nitro Version: 2.11.12\n- Package Manager: pnpm@10.12.1\n- Builder: -\n- User Config: compatibilityDate, devtools, modules, css\n- Runtime Modules: @nuxt/ui@3.1.3\n- Build Modules: -\n------------------------------\n\n### Is this bug related to Nuxt or Vue?\n\nNuxt/Nuxt UI\n\n### Version\n\nv3.17.5/v3.1.3\n\n### Reproduction\n\n```\npnpm create nuxt {project-name}\n\nskip setting up git and don't add any modules\n\npnpm add @nuxt/ui\n```\nSetup as per the docs for nuxt.config and css\n\nrun `pnpm run dev`\n\n### Description\n\nI've tried server times with the same results using `pnpm`. `npm` seem to work fine following the same steps.\n```console\nPre-transform error: Can't resolve 'tailwindcss' in /demo/assets/css'\n Plugin: @tailwindcss/vite:generate:serve\n File:/demo/assets/css\n```\n\n### Additional context\n\nJust cursor and warp and both product the same results.\n\n### Logs\n\n```shell-script\n\n```",[3040,3041],{"name":3021,"color":3022},{"name":3024,"color":3025},4339,"closed","Issue using pnpm 10.12.1: Can't resolve 'tailwindcss'","2025-06-16T12:54:09Z","https://github.com/nuxt/ui/issues/4339",0.57142144,{"description":3049,"labels":3050,"number":3057,"owner":3030,"repository":3030,"state":3043,"title":3058,"updated_at":3059,"url":3060,"score":3061},"### Environment\n\n- Operating System: Darwin\n- Node Version: v20.11.0\n- Nuxt Version: 3.15.2\n- CLI Version: 3.20.0\n- Nitro Version: 2.10.4\n- Package Manager: npm@10.8.3\n- Builder: -\n- User Config: modules, devtools, app, css, colorMode, runtimeConfig, routeRules, watch, experimental, compatibilityDate, vite, primevue, tailwindcss\n- Runtime Modules: @primevue/nuxt-module@4.2.5, @nuxtjs/tailwindcss@6.13.1, @nuxtjs/color-mode@3.5.2, @nuxt/eslint@0.7.5\n- Build Modules: -\n\n### Reproduction\n\nI setup two examples on Stackblitz, checkout the `app.vue`:\n- [Working with 3.15.2](https://stackblitz.com/edit/github-5q6fvymf?file=app.vue)\n- [Failing with 3.15.3](https://stackblitz.com/edit/github-5q6fvymf-otol8ppp?file=app.vue)\n\n### Describe the bug\n\nSince version `3.15.3` the `resolveConfig` method does no longer work\n\n### Additional context\n\nI am using https://nuxt.com/modules/tailwindcss. **It works fine with 3.15.2 and older.**\n\n### Logs\n\n```shell-script\n[nuxt] [request error] [unhandled] [500] Cannot find module './lib/public/resolve-config'\n```",[3051,3054],{"name":3052,"color":3053},"pending triage","E99695",{"name":3055,"color":3056},"possible regression","B90A42",30795,"resolveConfig with tailwindcss does not work in 3.15.3","2025-02-08T22:12:49Z","https://github.com/nuxt/nuxt/issues/30795",0.5973942,{"labels":3063,"number":3064,"owner":3030,"repository":3030,"state":3043,"title":3065,"updated_at":3066,"url":3067,"score":3068},[],12025,"Error when attempting to use Tailwind CSS with Nuxt 3","2023-01-19T15:54:17Z","https://github.com/nuxt/nuxt/issues/12025",0.608564,{"labels":3070,"number":3075,"owner":3030,"repository":3030,"state":3043,"title":3065,"updated_at":3076,"url":3077,"score":3078},[3071,3074],{"name":3072,"color":3073},"3.x","29bc7f",{"name":3021,"color":3022},11937,"2023-01-19T16:08:26Z","https://github.com/nuxt/nuxt/issues/11937",0.6088304,{"description":3080,"labels":3081,"number":3084,"owner":3030,"repository":3030,"state":3043,"title":3085,"updated_at":3086,"url":3087,"score":3088},"### Environment\r\n\r\n------------------------------\r\n- Operating System: `Linux`\r\n- Node Version: `v16.14.2`\r\n- Nuxt Version: `3.0.0`\r\n- Nitro Version: `1.0.0`\r\n- Package Manager: `npm@7.17.0`\r\n- Builder: `vite`\r\n- User Config: `-`\r\n- Runtime Modules: `-`\r\n- Build Modules: `-`\r\n------------------------------\r\n\r\n### Reproduction\r\n\r\nhttps://stackblitz.com/edit/github-nlp6fz?file=app.vue\r\n\r\n### Describe the bug\r\n\r\nI don't know if this is the right place to ask this, but I have been trying to use tailwind with nuxt 3.0.0 but it doesn't seem to work.\r\n\r\nI have tried both using the `nuxt/tailwind` and the `tailwindcss` package but doesn't work, hence why I suspect this has to do with nuxt.\r\n\r\n### Additional context\r\n\r\n\r\nThe applied class appears as a plain text\r\n\r\n_No response_\r\n\r\n### Logs\r\n\r\n_No response_",[3082,3083],{"name":3072,"color":3073},{"name":3052,"color":3053},15540,"TailwindCSS doesn't seem to work with Nuxt v.3.0.0","2023-01-19T17:53:32Z","https://github.com/nuxt/nuxt/issues/15540",0.6142171,{"labels":3090,"number":3093,"owner":3030,"repository":3030,"state":3043,"title":3094,"updated_at":3095,"url":3096,"score":3097},[3091,3092],{"name":3072,"color":3073},{"name":3052,"color":3053},13475,"Tailwind module not working","2023-01-19T16:57:29Z","https://github.com/nuxt/nuxt/issues/13475",0.6165222,{"description":3099,"labels":3100,"number":3103,"owner":3030,"repository":3030,"state":3043,"title":3104,"updated_at":3105,"url":3106,"score":3107},"### Environment\n\n------------------------------\r\n- Operating System: `Linux`\r\n- Node Version: `v16.14.2`\r\n- Nuxt Version: `3.0.0-rc.13-27781123.265db50`\r\n- Nitro Version: `0.6.1-27781459.72c912e`\r\n- Package Manager: `yarn@1.22.19`\r\n- Builder: `vite`\r\n- User Config: `modules`\r\n- Runtime Modules: `@nuxtjs/tailwindcss@6.1.1`\r\n- Build Modules: `-`\r\n------------------------------\n\n### Reproduction\n\nhttps://stackblitz.com/edit/github-846kga?file=package.json\n\n### Describe the bug\n\nUnable to start the dev server after an upgrade from [3.0.0-rc.13-27779883.2284525](https://www.npmjs.com/package/nuxt3/v/3.0.0-rc.13-27779883.2284525) to [3.0.0-rc.13-27781123.265db50](https://www.npmjs.com/package/nuxt3/v/3.0.0-rc.13-27781123.265db50)\n\n### Additional context\n\n_No response_\n\n### Logs\n\n_No response_",[3101,3102],{"name":3072,"color":3073},{"name":3052,"color":3053},15287,"Tailwind CSS module error","2023-01-19T17:47:18Z","https://github.com/nuxt/nuxt/issues/15287",0.61857015,{"description":3109,"labels":3110,"number":3113,"owner":3030,"repository":3030,"state":3043,"title":3114,"updated_at":3115,"url":3116,"score":3117},"### Environment\r\n\r\n- Operating System: `Linux`\r\n- Node Version: `v18.13.0`\r\n- Nuxt Version: `2.15.8`\r\n- Nitro Version: `-`\r\n- Package Manager: `npm@8.19.3`\r\n- Builder: `webpack`\r\n- User Config: `head`, `css`, `plugins`, `components`, `buildModules`, `modules`, `build`\r\n- Runtime Modules: `-`\r\n- Build Modules: `@nuxt/typescript-build@2.1.0`, `@nuxtjs/tailwindcss@5.3.5`\r\n\r\n### Reproduction\r\n\r\nhttps://github.com/jaonoctus/nuxt-with-tailwind\r\n\r\n- `npm init nuxt-app nuxt-with-tailwind` with the following config:\r\n\r\n```\r\n? Project name: nuxt-with-tailwind\r\n? Programming language: TypeScript\r\n? Package manager: Npm\r\n? UI framework: Tailwind CSS\r\n? Template engine: HTML\r\n? Nuxt.js modules: (Press \u003Cspace> to select, \u003Ca> to toggle all, \u003Ci> to invert selection)\r\n? Linting tools: (Press \u003Cspace> to select, \u003Ca> to toggle all, \u003Ci> to invert selection)\r\n? Testing framework: None\r\n? Rendering mode: Universal (SSR / SSG)\r\n? Deployment target: Server (Node.js hosting)\r\n? Development tools: (Press \u003Cspace> to select, \u003Ca> to toggle all, \u003Ci> to invert selection)\r\n? What is your GitHub username?\r\n? Version control system: None\r\n```\r\n\r\n### Describe the bug\r\n\r\nI cannot `npm run build` or `npm run dev` the app with Tailwind\r\n\r\n\r\nhttps://user-images.githubusercontent.com/7918067/211672251-2fe0d3e8-b919-4c3a-9177-df370f46d632.mp4\r\n\r\n\r\n\r\n### Additional context\r\n\r\n_No response_\r\n\r\n### Logs\r\n\r\n```shell\r\nFATAL Cannot destructure property 'nuxt' of 'this' as it is undefined. 18:46:10\r\n\r\n at postcss8Module (node_modules/@nuxt/postcss8/dist/index.js:15:10)\r\n at installModule (node_modules/@nuxt/kit/dist/index.mjs:416:9)\r\n at async setup (node_modules/@nuxtjs/tailwindcss/dist/module.mjs:186:7)\r\n at async ModuleContainer.normalizedModule (node_modules/@nuxt/kit/dist/index.mjs:167:5)\r\n at async ModuleContainer.addModule (node_modules/@nuxt/core/dist/core.js:239:20)\r\n at async ModuleContainer.ready (node_modules/@nuxt/core/dist/core.js:51:7)\r\n at async Nuxt._init (node_modules/@nuxt/core/dist/core.js:478:5)\r\n\r\n\r\n ╭─────────────────────────────────────────────────────────────────────────────────╮\r\n │ │\r\n │ ✖ Nuxt Fatal Error │\r\n │ │\r\n │ TypeError: Cannot destructure property 'nuxt' of 'this' as it is undefined. │\r\n │ │\r\n ╰─────────────────────────────────────────────────────────────────────────────────╯\r\n```\r\n\r\n",[3111,3112],{"name":3072,"color":3073},{"name":3052,"color":3053},12338,"Cannot init a nuxt project with Tailwind","2023-01-19T16:23:50Z","https://github.com/nuxt/nuxt/issues/12338",0.62131506,{"description":3119,"labels":3120,"number":3126,"owner":3030,"repository":3030,"state":3043,"title":3127,"updated_at":3128,"url":3129,"score":3130},"### Environment\n\n- Operating System: `Darwin`\r\n- Node Version: `v20.11.1`\r\n- Nuxt Version: `3.11.2`\r\n- CLI Version: `3.11.1`\r\n- Nitro Version: `2.9.6`\r\n- Package Manager: `yarn@4.2.2`\r\n- Builder: `-`\r\n- User Config: `devtools`, `debug`, `hooks`, `modules`, `plugins`, `nitro`, `runtimeConfig`, `dayjs`, `postcss`, `app`, `css`, `apollo`, `carousel`, `tour`, `vue`, `routeRules`\r\n- Runtime Modules: `@nuxtjs/tailwindcss@6.12.0`, `@nuxtjs/device@3.1.1`, `@nuxt/image@1.4.0`, `@pinia/nuxt@0.5.1`, `@pinia-plugin-persistedstate/nuxt@1.2.0`, `dayjs-nuxt@2.1.9`, `vue3-carousel-nuxt@1.1.1`, `@nuxtjs/apollo@5.0.0-alpha.14`, `nuxt-tour@0.0.9`, `@nuxtjs/i18n@8.3.1`\r\n- Build Modules: `-`\r\n\n\n### Reproduction\n\nCannot reproduce the issue either on new repo or stackblitz\r\n\r\nUsing \r\n\r\n \"nuxt\": \"^3.11.2\",\r\n \"@nuxtjs/tailwindcss\": \"^6.12.0\",\n\n### Describe the bug\n\nIn the below image in nuxt 3 bg-transparent is added at last but it is overridden by bg-yocket-neutral-100\r\n\r\n\u003Cimg width=\"647\" alt=\"Screenshot 2024-05-28 at 5 46 06 PM\" src=\"https://github.com/nuxt/nuxt/assets/45727492/081685a9-7c97-4f4e-8449-e3f0bfbc0719\">\r\n\r\nIn nuxt 2 the behaviour was opposite\r\n\u003Cimg width=\"1115\" alt=\"Screenshot 2024-05-28 at 5 52 22 PM\" src=\"https://github.com/nuxt/nuxt/assets/45727492/f4d6d5f5-d323-4312-bb37-46a4fb52f776\">\r\n\r\n\r\nThis same thing is happening throughout the project\n\n### Additional context\n\n_No response_\n\n### Logs\n\n_No response_",[3121,3122,3123],{"name":3072,"color":3073},{"name":3052,"color":3053},{"name":3124,"color":3125},"needs reproduction","FBCA04",27385,"Tailwindcss added at last is not applied","2024-05-30T05:43:05Z","https://github.com/nuxt/nuxt/issues/27385",0.6227624,["Reactive",3132],{},["Set"],["ShallowReactive",3135],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fPB9UfMTSKBuxS3UVJ_tESU9cAJi5Dmv_IKih7Wn5AUw":-1},"/nuxt/ui/4617"]