-
-
Notifications
You must be signed in to change notification settings - Fork 233
Description
What version of VS Code are you using?
v1.104.1
What version of Tailwind CSS IntelliSense are you using?
v0.14.29
What version of Tailwind CSS are you using?
4.1.17
What package manager are you using?
pnpm
What operating system are you using?
macOS
Tailwind CSS Stylesheet (v4) or config file (v3)
It's a monorepo, but only one main config file.
Main file:
@import "tailwindcss";Example app/package usage:
@import "@repo/ui/globals.css";VS Code settings
Used a vanilla setup to rule out any issues from weird settings, so basically it's:
{}Reproduction URL
I've tried to create the simplest possible repro:
https://github.com/hugotiger/tailwindcss-intellisense-pnpm-monorepo-exports-bug/tree/main
Describe your issue
In a PNPM monorepo, I have a shared package that exports a CSS file containing the Tailwind config (e.g. globals.css). When that file is included in the exports field of the shared package’s package.json, Tailwind CSS Intellisense stops working inside the shared package.
I expect Intellisense to work in both the shared package (where the Tailwind setup lives) and in each app/package that consumes it. This pattern—centralizing Tailwind config and shared UI code—is pretty common in monorepos, and from reading the docs it sounds like this use-case should be supported (though I might be misunderstanding something).
I’ve found two things that make Intellisense start working again:
- Removing one of the example apps
- Removing
globals.cssfrom the shared package’sexportsfield
As a workaround, setting tailwindCSS.experimental.configFile in VSCode does restore Intellisense, but it'd be nice if this could be avoided!
I’m happy to provide more details, examples, or even help with fixing this issue if needed 😄