Skip to content

Following Tailwind CSS installation guide breaks working Laravel default installation #16695

@sanskar-mk2

Description

@sanskar-mk2

Issue Description

Tailwind CSS works perfectly in a fresh Laravel installation out of the box. However, following the official Tailwind installation guide breaks this working setup.

Error Message

[plugin:@tailwindcss/vite:generate:serve] Can't resolve 'tailwindcss' in 'F:\mre\resources\css'

Environment

  • Laravel Framework: v11.31 (installed via Laravel installer v5.11.2)
  • Default working Tailwind: v3.4.13 (provided by Laravel)
  • Tailwind version after following docs: v3.4.17
  • @tailwindcss/vite: v4.0.7

Steps to Reproduce

  1. Install fresh Laravel project using Laravel installer
    • Confirm Tailwind CSS works correctly at this point
  2. Follow the official guide at https://tailwindcss.com/docs/installation/framework-guides/laravel/vite
  3. The previously working Tailwind setup now fails

Expected Behavior

The official Tailwind installation guide should either:

  • Recognize and preserve Laravel's working default setup
  • Or clearly indicate that these steps are unnecessary for Laravel's default installation

Actual Behavior

Following the documentation breaks the working default Tailwind installation that comes with Laravel.

Suggestion

The Tailwind documentation should be updated to acknowledge Laravel's default installation and provide guidance specifically for cases where additional configuration is needed beyond the default setup.

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