Skip to content
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

Update generator to install TailwindCSS v4 with Vite plugin #186

Merged
merged 2 commits into from
Jan 30, 2025

Conversation

arandilopez
Copy link
Contributor

Hi everyone! The motivation for this PR is I recently started a new project and noticed this error when loading the example provided by the install generator.

Screenshot 2025-01-27 at 11 51 08 p m

I saw that the generator installed TailwindCSS v4 - released this month - and conflicts with the configuration provided.

So, these changes will install TailwindCSS v4 and plugins along with the Vite plugin as recommended in its documentation.

Other notable changes are: No need for a tailwindcss.config.js file, no postcss.config.js file because of the Vite plugin, and no need for the @tailwindcss/container-queries

More information was provided in this article.

@arandilopez
Copy link
Contributor Author

For anyone who also sees this error, it can be fixed by changing the version in the package.json to "tailwindcss": "3.4.17". Or, If you wanna use Tailwind CSS v4, execute npx @tailwindcss/upgrade@next and follow the upgrade instructions.

Copy link
Contributor

@skryukov skryukov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried it, Vite plugin works like a charm! Thanks @arandilopez!

@bknoles bknoles changed the base branch from master to partial-reload-guard-rails January 30, 2025 03:43
@bknoles bknoles changed the base branch from partial-reload-guard-rails to master January 30, 2025 03:44
@bknoles bknoles merged commit 9581bfa into inertiajs:master Jan 30, 2025
31 of 55 checks passed
@bknoles
Copy link
Collaborator

bknoles commented Jan 30, 2025

Thanks @arandilopez ! Your changes merged in via #187 because there were a couple other CI fixes (that also needed these fixes) in order to get the test suite passing!

@arandilopez arandilopez deleted the tailwindcss-v4 branch January 30, 2025 17:32
@arandilopez
Copy link
Contributor Author

My pleasure, guys.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants