Skip to content

Multiple tailwind configs are not handled properly #335

Closed
@artaommahe

Description

@artaommahe

What version of prettier-plugin-tailwindcss are you using?

v0.6.9

What version of Tailwind CSS are you using?

v3.4.16

What version of Node.js are you using?

v20.18.1

What package manager are you using?

npm

What operating system are you using?

macOS 15.1.1 (24B91)

Reproduction URL

https://github.com/artaommahe/tailwind-intellisense-multiple-configs

  • clone
  • npm install
  • npm run dev
  • see that everything looks like expected
    image
  • open Button component in vscode
  • see that p-2 and border-secondary classes are not on their expected place like they are some unknown classes
    image

Describe your issue

In our project we're on a way of slow migration from the old messy design system (set in the main tailwind config) to the new shinny one (set in another config). While tailwind itself recognizes both configs and there corresponding content files properly and all the colors and other values are correct in the browser, the prettier-plugin-tailwindcss lib struggles here and doesn't recognize classes from the second config within expected folders (new-design/* and ui-kit/*) which is why the sorting result is wrong.

Similar issue with tailwindcss-intellisense vscode extension tailwindlabs/tailwindcss-intellisense#1108

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions