-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Laravel docs need some work - currently incorrect #1978
Comments
The reproduction step is unclear. Did you remove
I don't understand the question about |
I've not added/removed anything, as I say, a fresh copy of Laravel so the default vite file and packages that it installs. I'm not sure calling it "An entire vite file" is quite fair, it adds 1 line to the example if indeed it does still require For reproduction steps:
|
If it helps, I second this. Following the tailwind v4 setup instructions on the tailwind website, against a fresh copy of the latest version of laravel results in an error when running Both give the output:
|
Compared a working tailwind 4 laravel install (done via the upgrade cli) against a fresh one with the current tailwind 4 laravel instructions. The issue is that the current latest At present, in order to use tailwind 4 with a new laravel install, the following steps are missing from the tailwind docs:
|
Maybe it would be more beneficial to update the Laravel installation to use Tailwind 4. In progress: laravel/laravel#6523 Regardless, I now understand your issue. I never actually followed the first step myself, so I didn't realize that it already includes TailwindCSS. So, theoretically, once the mentioned PR is merged, you should only need to execute the first step when installing Laravel, which will then use TailwindCSS 4 instead of v3. The other steps are just useful as additional information to show which configurations are included. I assume the issue is caused by Laravel preferring TailwindCSS by default, so it is included in the installer. |
sorry - it was late last night when i posed the above - i meant to add as well that the issue should ideally be resolved on the laravel side as you have said. The above was for anyone in the meantime who found there way to this issue. i was surprised as well to find that laravel has tailwind installed by default - it didn't used to! it used to be completely frontend-agnostic, and there was a cli command to add tailwind and load in some default tailwind views. But i haven't set up many new laravel projects in a while. That said - a comment in laravel/laravel#6523 implies that it won't get merged until they have updated some related packages to support tailwind 4. It may be worth at least putting a warning on the tailwind docs to acknowledge this? Something like "If your package.json has tailwind 3 in it..." or even recommend just running tailwind's auto upgrade tool, which should fix it in one hit... |
Thanks for the clarification! Going to close this then since it's not an issue in our docs but looks like the Laravel community is already fixing things 💪 |
The new framework setup docs for Laravel are not functioning on a fresh install of Laravel and Tailwind 4.
It makes no mention of what to do with the existing laravel-vite-plugin that is installed as default. If you leave it in place you get the following error:
If you remove it, you then can't compile as you get a vite error:
If you remove it and try running
npm run dev
you get a manifest error as the Laravel plugin is presumably required.As it stands on a fresh install of Laravel 11 and TailwindCSS 4, you cannot get a working environment setup using the provided instructions.
The text was updated successfully, but these errors were encountered: