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 vite docs install for Vite v6 + Tailwind v4 #1024

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

PatMulligan
Copy link

@PatMulligan PatMulligan commented Jan 30, 2025

πŸ”— Linked issue

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Installing using VITE v6.0.11, it appears that postcss is no longer included in the vite installation

Also breaking changes related to Tailwind v4

Error: It looks like you're trying to use tailwindcss directly as a PostCSS plugin. The PostCSS plugin has mov ed to a separate package, so to continue using Tailwind CSS with PostCSS you'll need to install @tailwindcss/po stcss and update your PostCSS configuration.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

PatMulligan and others added 2 commits January 30, 2025 11:25
postcss no longer part of vite

update  other snippet

fix typo
@PatMulligan PatMulligan force-pushed the update-vite-docs-install branch from 707e4bc to ace155a Compare January 30, 2025 10:28
@PatMulligan
Copy link
Author

not sure if it's desirable to leave an option for a postcss.config.js or not! second commit removes it altogether

@PatMulligan
Copy link
Author

PatMulligan commented Jan 30, 2025

ah, not quite fixed. it's yelling at me for not having postcss now, anyone know the correct way to incorporate these packages?

reference for tailwind v4
https://tailwindcss.com/docs/upgrade-guide

@PatMulligan PatMulligan changed the title Update vite docs install Update vite docs install for Vite v6 + Tailwind v4 Jan 30, 2025
@PatMulligan
Copy link
Author

PatMulligan commented Jan 30, 2025

okay, updated the package installation according to the Tailwind V4 docs

There are two things that would require updating related to the npx shadcn-vue@latest init :

  1. the top should now be:
- @tailwind base;
- @tailwind components;
- @tailwind utilities;
+ @import "tailwindcss";
...
  1. And then it seems like the utility class border-border in the index.css is no longer recognized, will check the tailwind release notes

[vite] Internal server error: Cannot apply unknown utility class: border-border

edit: actually it doesn't seem to be correctly loading tailwindcss at all, utility classes aren't working nvm, seems fine

@almarzn
Copy link

almarzn commented Jan 30, 2025

And then it seems like the utility class border-border in the index.css is no longer recognized, will check the tailwind release notes

it is box-border now.

Anyway I'm trying to migrate as well, here are the things I also had to change:

  • The color theme customization is different now. You have to use --color-background instead of --background, with hsl() and inside a @theme directive
  • The primary etc color don't seem to be working on buttons, need to investigate

@PatMulligan
Copy link
Author

PatMulligan commented Jan 30, 2025

cool thx!

according to tailwindlabs/tailwindcss#15778 (comment) , @apply should probably just be junked all together

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.

2 participants