-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # 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:
After:
Additional context
Reverting to 6.12.0 currently solve the problem
Logs
The text was updated successfully, but these errors were encountered: