Skip to content

Vite 7 incompatible with @tailwindcss/vite due to strict peer dependency (^5.2.0 || ^6) #20284

@code-pankaj

Description

@code-pankaj

Describe the bug

The @tailwindcss/vite plugin currently declares a peer dependency of "vite": "^5.2.0 || ^6".

With the release of [email protected], any attempt to install Tailwind's official Vite plugin in a fresh Vite 7 project fails due to a dependency resolution error:

ERESOLVE unable to resolve dependency tree
peer vite@"^5.2.0 || ^6" from @tailwindcss/[email protected]

This breaks compatibility with the current npm create vite@latest workflow.

If the plugin is compatible with Vite 7, the peer dependency needs to be updated. If not yet tested, it might help to clarify compatibility in the docs or postpone release adoption.

I’m happy to test or help with a PR once compatibility is confirmed.

Reproduction

https://github.com/code-pankaj/vite7-issue-with-tailwindcss

Steps to reproduce

npm create vite@latest

//select React and Typescript

cd

npm install

npm install tailwindcss @tailwindcss/vite

System Info

System:
    OS: Linux 6.11 Ubuntu 24.04.2 LTS 24.04.2 LTS (Noble Numbat)
    CPU: (4) x64 Intel(R) Core(TM) i3-1005G1 CPU @ 1.20GHz
    Memory: 2.03 GB / 7.50 GB
    Container: Yes
    Shell: 5.9 - /usr/bin/zsh
  Binaries:
    Node: 24.2.0 - ~/.nvm/versions/node/v24.2.0/bin/node
    Yarn: 1.22.22 - ~/.nvm/versions/node/v24.2.0/bin/yarn
    npm: 11.3.0 - ~/.nvm/versions/node/v24.2.0/bin/npm
    bun: 1.2.15 - ~/.bun/bin/bun
  Browsers:
    Brave Browser: 137.1.79.126
    Chrome: 137.0.7151.119

Used Package Manager

npm

Logs

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions