-
-
Notifications
You must be signed in to change notification settings - Fork 403
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
base: dev
Are you sure you want to change the base?
Conversation
707e4bc
to
ace155a
Compare
not sure if it's desirable to leave an option for a |
reference for tailwind v4 |
okay, updated the package installation according to the Tailwind V4 docs There are two things that would require updating related to the
- @tailwind base;
- @tailwind components;
- @tailwind utilities;
+ @import "tailwindcss";
...
|
it is box-border now. Anyway I'm trying to migrate as well, here are the things I also had to change:
|
cool thx! according to tailwindlabs/tailwindcss#15778 (comment) , |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please keep the TailwindCSS v3
installation too?
But make TailwindCSS v4
bolder (which already is, I meant to keep it on top)
Does the |
Tailwind v4 is not yet supported as config is now write in css main file and not in a tailwind.config.js |
Using my css sheet, one of the things I had to do for proper functioning was to have the following up top (note this replaces the typical v3 import statements). @import "tailwindcss";
@config "@/tailwind.config.js";
... |
@@ -27,62 +27,23 @@ npm create vite@latest my-vue-app -- --template vue-ts | |||
|
|||
Install `tailwindcss` and its peer dependencies, then generate your `tailwind.config.js` and configure `postcss` plugins |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I understand they removed the config file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes it sense to wait or should i update now to Tailwind 4 for a Production Project ? |
What should |
"JavaScript config files are still supported for backward compatibility, but they are no longer detected automatically in v4. If you still need to use a JavaScript config file, you can load it explicitly using the @config directive" @andrerfcsantos https://tailwindcss.com/docs/upgrade-guide#using-a-javascript-config-file |
@ssiyad I get that, I'm just wondering what the contents of |
Nothing, right? Our config should go in a separate css file and be imported in |
postcss no longer part of vite
984194a
to
f0603c2
Compare
I wouldn't recommend anyone use this for production yet until shadcn is updated. If you want you can use the upgrade guide script which does indeed get rid of tailwind.config.js and imports everything into the css file. As a result, adding in shadcn components won't work because it looks for the config file. |
I put the original config, which should be redundant and have no conflicts with other configs. But after that, I ran into #1090. After I tricked the script into believing there was a valid config, the styles on the page didn't seem correct. In the end I just gave up and I'll wait for proper support for v4. I see there's already a PR lined up. Shadcn for React already supports Tailwind v4, so starting this project in React and not in Vue is also something I'm considering. |
π Linked issue
β Type of 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
π Checklist