-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
6.13 Regression: VS Code Intellisense not working when using a remote Layer #944
Comments
That's fine -- would you still be able to provide the contents of the generate |
Sorry for the delay, I completely forgot. .nuxt/tailwind.config.cjs: // generated by the @nuxtjs/tailwindcss <https://github.com/nuxt-modules/tailwindcss> module at 1/27/2025, 12:05:10 PM
const configMerger = require("/Users/sleblanc/www/project_name/node_modules/layer_name/node_modules/@nuxtjs/tailwindcss/dist/runtime/merger.js");
const inlineConfig = {"content":[],"theme":{"extend":{}},"plugins":[]};
const config = [
require("/Users/sleblanc/www/project_name/node_modules/layer_name/tailwind.config.ts")
].reduce((prev, curr) => configMerger(curr, prev), configMerger(inlineConfig, { content: { files: ["/Users/sleblanc/www/project_name/node_modules/layer_name/app/components/**/*.{vue,js,jsx,mjs,ts,tsx}","/Users/sleblanc/www/project_name/app/components/global/**/*.{vue,js,jsx,mjs,ts,tsx}","/Users/sleblanc/www/project_name/app/components/**/*.{vue,js,jsx,mjs,ts,tsx}","/Users/sleblanc/www/project_name/node_modules/layer_name/app/layouts/**/*.{vue,js,jsx,mjs,ts,tsx}","/Users/sleblanc/www/project_name/node_modules/layer_name/app/pages/**/*.{vue,js,jsx,mjs,ts,tsx}","/Users/sleblanc/www/project_name/node_modules/layer_name/app/plugins/**/*.{js,ts,mjs}","/Users/sleblanc/www/project_name/node_modules/layer_name/app/composables/**/*.{js,ts,mjs}","/Users/sleblanc/www/project_name/node_modules/layer_name/app/utils/**/*.{js,ts,mjs}","/Users/sleblanc/www/project_name/node_modules/layer_name/app/{A,a}pp.{vue,js,jsx,mjs,ts,tsx}","/Users/sleblanc/www/project_name/node_modules/layer_name/app/{E,e}rror.{vue,js,jsx,mjs,ts,tsx}","/Users/sleblanc/www/project_name/node_modules/layer_name/app/app.config.{js,ts,mjs}","/Users/sleblanc/www/project_name/app/components/**/*.{vue,js,jsx,mjs,ts,tsx}","/Users/sleblanc/www/project_name/app/components/global/**/*.{vue,js,jsx,mjs,ts,tsx}","/Users/sleblanc/www/project_name/app/components/**/*.{vue,js,jsx,mjs,ts,tsx}","/Users/sleblanc/www/project_name/app/layouts/**/*.{vue,js,jsx,mjs,ts,tsx}","/Users/sleblanc/www/project_name/app/pages/**/*.{vue,js,jsx,mjs,ts,tsx}","/Users/sleblanc/www/project_name/app/plugins/**/*.{js,ts,mjs}","/Users/sleblanc/www/project_name/app/composables/**/*.{js,ts,mjs}","/Users/sleblanc/www/project_name/app/utils/**/*.{js,ts,mjs}","/Users/sleblanc/www/project_name/app/{A,a}pp.{vue,js,jsx,mjs,ts,tsx}","/Users/sleblanc/www/project_name/app/{E,e}rror.{vue,js,jsx,mjs,ts,tsx}","/Users/sleblanc/www/project_name/app/app.config.{js,ts,mjs}"] } }));
module.exports = (() => {const cfg=config;cfg["darkMode"] = ["selector","[class~=\"dark-mode\"]"];;return cfg;})() .nuxt/tailwind/postcss.mjs: // generated by the @nuxtjs/tailwindcss <https://github.com/nuxt-modules/tailwindcss> module at 1/27/2025, 12:07:29 PM
import configMerger from "@nuxtjs/tailwindcss/merger";
import cfg4 from "/Users/sleblanc/www/project_name/node_modules/layer_name/tailwind.config.ts";
const config = [
{"content":{"files":["/Users/sleblanc/www/project_name/app/components/**/*.{vue,js,jsx,mjs,ts,tsx}","/Users/sleblanc/www/project_name/app/components/global/**/*.{vue,js,jsx,mjs,ts,tsx}","/Users/sleblanc/www/project_name/app/components/**/*.{vue,js,jsx,mjs,ts,tsx}","/Users/sleblanc/www/project_name/app/layouts/**/*.{vue,js,jsx,mjs,ts,tsx}","/Users/sleblanc/www/project_name/app/pages/**/*.{vue,js,jsx,mjs,ts,tsx}","/Users/sleblanc/www/project_name/app/plugins/**/*.{js,ts,mjs}","/Users/sleblanc/www/project_name/composables/**/*.{js,ts,mjs}","/Users/sleblanc/www/project_name/utils/**/*.{js,ts,mjs}","/Users/sleblanc/www/project_name/app/{A,a}pp.{vue,js,jsx,mjs,ts,tsx}","/Users/sleblanc/www/project_name/app/{E,e}rror.{vue,js,jsx,mjs,ts,tsx}","/Users/sleblanc/www/project_name/app/app.config.{js,ts,mjs}","/Users/sleblanc/www/project_name/app/app/spa-loading-template.html"]}},
{},
{"content":{"files":["/Users/sleblanc/www/project_name/node_modules/layer_name/app/components/**/*.{vue,js,jsx,mjs,ts,tsx}","/Users/sleblanc/www/project_name/node_modules/layer_name/app/layouts/**/*.{vue,js,jsx,mjs,ts,tsx}","/Users/sleblanc/www/project_name/node_modules/layer_name/app/pages/**/*.{vue,js,jsx,mjs,ts,tsx}","/Users/sleblanc/www/project_name/node_modules/layer_name/app/plugins/**/*.{js,ts,mjs}","/Users/sleblanc/www/project_name/node_modules/layer_name/composables/**/*.{js,ts,mjs}","/Users/sleblanc/www/project_name/node_modules/layer_name/utils/**/*.{js,ts,mjs}","/Users/sleblanc/www/project_name/node_modules/layer_name/app/{A,a}pp.{vue,js,jsx,mjs,ts,tsx}","/Users/sleblanc/www/project_name/node_modules/layer_name/app/{E,e}rror.{vue,js,jsx,mjs,ts,tsx}","/Users/sleblanc/www/project_name/node_modules/layer_name/app/app.config.{js,ts,mjs}","/Users/sleblanc/www/project_name/node_modules/layer_name/app/app/spa-loading-template.html"]}},
cfg4
].reduce((acc, curr) => configMerger(acc, curr), {});
const resolvedConfig = (() => {const cfg=config;cfg["darkMode"] = ["selector","[class~=\"dark-mode\"]"];;return cfg;})();
export default resolvedConfig; I'm not sure the issue is with the content, I think the VS Code extension probably load the top-most |
The extension is https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss by the official "Tailwindcss" team, downloaded over 8 million times. And the README state:
|
I guess we could use the
![]() |
Ah!! I see what the issue is in your case now! Your Nuxt app is lacking a root What I (still) recommend for now (as a workaround for you) meanwhile is a small module in your project as I mentioned in our conversation: export default defineNuxtModule((_, nuxt) => {
addTemplate({
filename: 'tailwind.config.cjs', // make sure this doesn't interfere with exposeConfig
getContents: () => "module.exports = require('./tailwind/postcss.mjs')" // or hook into `tailwindcss:config` and `update:template`
})
}) So this way you may not need to configure |
I suppose naming the file |
@ineshbose Maybe there is another workaround 🤔 Something like this: import config from `@layer/my-layer/tailwind.config`;
export default config; Then it would simply be a documentation issue ? |
Otherwise, is there no way to have a |
Same here, downgrade to 6.12.2 fixed problem for me. But that's nuts. |
I hope this can be fixed in a patch/minor that wont require/force us to upgrade to Tailwind v4 |
Yes - I can assure you that I'm trying to brainstorm a solution for this (based on DX and effort/benefit), and I will definitely provide you with one. But I don't think this is relevant for Tailwind v4 where JS configs are legacy, so it's limited to v3. |
Environment
Layer:
App:
Reproduction
Cannot be reproduced inside a sandbox
Describe the bug
The change from
.nuxt/tailwind.config.cjs
to.nuxt/tailwind/postcss.mjs
seems to have broken VS Code Intellisense.Now, instead of suggeting all values from Tailwind and my config, it only suggest value I already use inside my app.
Before:
![Image](https://private-user-images.githubusercontent.com/17392251/405770883-5090ff16-a3bc-4d27-9f9c-238d9f7c1010.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzMTM5NDgsIm5iZiI6MTczOTMxMzY0OCwicGF0aCI6Ii8xNzM5MjI1MS80MDU3NzA4ODMtNTA5MGZmMTYtYTNiYy00ZDI3LTlmOWMtMjM4ZDlmN2MxMDEwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjExVDIyNDA0OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTcyNjUyMzIxNzM4ZDJkODU4M2ZmZjAxYmJmMGE5ZGI3ZTgzZDljMjFkNjZhNzNjOGU3ZWY4NWFhOTFkM2MzOTEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.GdWTkJX2gbDGfZIhsWOgqZyvAhONzzeLIjQuelbh4TI)
After:
![Image](https://private-user-images.githubusercontent.com/17392251/405769718-aefa107e-3c0d-48af-a47d-e8965881fc31.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzMTM5NDgsIm5iZiI6MTczOTMxMzY0OCwicGF0aCI6Ii8xNzM5MjI1MS80MDU3Njk3MTgtYWVmYTEwN2UtM2MwZC00OGFmLWE0N2QtZTg5NjU4ODFmYzMxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjExVDIyNDA0OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWFmZjM4ZTVlMzY2YzJlMjZhMWFhZDJjN2Y0ZWU5YmRmMjlkZjg0ZDFhNDUxYjdlNDk1YjczYTlkZTRhODg5YjImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.DATrI62SUFadMv1T0urEdcRKKi52Qf8nktLlFle5wOk)
Additional context
Reverting to 6.12.0 currently solve the problem
Logs
The text was updated successfully, but these errors were encountered: