-
Notifications
You must be signed in to change notification settings - Fork 218
Intellisense doesn't seem to work in an monorepo setup. #345
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
Comments
@rumansaleem Did you tried rename the |
I'm having the same issue. Glad someone mentioned it. Intellisense work well but for extended utilities in the TW config file, the extension picks up a random TW and show me the utilities I extended there. Not sure the logic behind this. By sure this isn't random but still the point is that I don't get any Intellisense autocomplete function for the project I'm working on. @benjifx all my config files are named tailwind.config.js |
Have you guys ever tried to create a Multi-root workspaces structure to be able to use multiple config files, before? |
I just noticed that there are a couple of globs that are responsible for finding the config file: tailwindcss-intellisense/src/index.ts Line 24 in f5dfe02
|
Thanks for the tip. However, in our case it didn't end up getting Intellisence working. |
Got it working! Firstly, make sure that your tailwind config file is named Then at your root, make a new module.exports = require('./packages/www/tailwind.config.js'); // relative path to your repo that uses tailwindcss Then move your tailwind and postcss dependencies from the repo that uses taliwind to the root. cd packages/www
yarn remove tailwindcss postcss
cd ../..
yarn add -W tailwindcss postcss Restart VS Code and it should be wroking for you. Note: Relative paths in your purge defition might also need to be overridden if you're running in |
Thank you @ebrearley! In an Nx workspace viewed as a
// just to get tailwindcss IntelliSense
module.exports = {}; Running |
Hey all, just want to clarify a few things:
|
Hey @bradlc, I already had my config file called I cannot get the extension working, when I have monorepo opened (i.e tailwind.config.js in a subdirectory). I tried looking into it, but couldn't see any errors reported in output panel, infact, I couldn't find any command from I cannot really share the project, but I can give you some context, it is not really a mono repo, It is a symfony1.4 (legacy) application 😅 with a subdirectory containing a react application (with custom webpack configuration). Also, I am able to get extension working when, I open the folder containing sub-project ( i.e. tailwind.config.js in workspace root). |
If you can't see the |
Uh Oh! I had ignored the directory in workspace setting, (I was trying something in a multi root workspace setup, I left it there and forgot about it). Removed that, restarted extension host, It seems all good. Thanks @bradlc. I think we can close this discussion. |
Thank you @bradlc! This seems to be the issue with me as well, |
in my case, I am using a preset as documented here
Tailwind correctly parses this if code is launched in the package directory, but not from the monorepo root. |
I had the same problem. Updating VS code settings as recommended in their official repo solved it. |
i ran into a similar problem. |
I'm having some issues using Lerna as monorepo. I've checked all the answers above and it seems that my configurations are ok! Can someone help me? |
Same for me, i'm using a monorepo and i have onmy my tailwind intelisense working on my apps/front but not on my package/ui |
Adding an empy tailwind.config.js file in the root is like a patch, you should have intellisense,for the default classes, not the custom ones |
Thankyou @yt-kevincarrera ,adding an empty tailwind.config.js file in the root fixed it. Works like a charm |
Hi, great work on the extension. I was setting up tailwind in a mono-repo setup, I found that the intellisense doesn't detect tailwind config file and no intellisense is provided.
I have a monorepo say "X" opened in vscode, and within that I have a sub project say "Y" containing vue & tailwind setup. So relative to workspace, the path to my tailwind.config.js is
X/Y/tailwindcss.config.js
. Also, I havepackage.json
&postcss.config.js
at the same level as tailwind.config.jsP.S. I'm not sure if it is about the tailwind.config.js being in a subdirectory.
The text was updated successfully, but these errors were encountered: