Migration from V3 to V4 - still need tailwind.config.js #16642
Replies: 3 comments 3 replies
-
If the upgrade tool sees some configuration it can't port, it will keep your JS config file.
You can manually port things across or delete the portion of configuration that the upgrade tool couldn't port and then manually port it across afterwards.
Try this: @utility skip-main {
&:is(a) {
@apply absolute top-[40px] w-[1px] h-[1px] overflow-hidden;
left: -999px;
z-index: -999;
background: #2d2828;
&:focus,
&:active {
@apply text-white bg-[#2d2828] left-[5px] top-[50px] min-w-[200px] text-center my-[10px] mx-[5px] p-[10px] text-base z-999 no-underline border border-black;
}
}
} |
Beta Was this translation helpful? Give feedback.
-
It happeded to me as well in my Nextjs project. Migration works successfully but my tailwind.config.js is gone. The issue is everything seems to be working fine I don't know how. Do I need to add tailwind config file again. What framework I am using Nodejs version Operating System Command output ≈ tailwindcss v4.0.7 │ Searching for CSS files in the current directory and its subdirectories… │ ↳ Linked │ Migrating JavaScript configuration files… │ ↳ Migrated configuration file: │ Migrating templates… │ ↳ Migrated templates for configuration file: │ Migrating stylesheets… │ ↳ Migrated stylesheet: │ Migrating PostCSS configuration… │ ↳ Installed package: │ ↳ Installed package: │ ↳ Removed package: │ ↳ Migrated PostCSS configuration: │ ↳ Migrated PostCSS configuration: │ ↳ Migrated PostCSS configuration: │ Updating dependencies… │ Updating dependencies… │ ↳ Updated package: │ Verify the changes and commit them to your repository. Done in 51.69s |
Beta Was this translation helpful? Give feedback.
-
Hi, Based on my experiments on our main project we had 2 features from the JS config which were blocking the full CSS migration and causing the insertion of
I may find additional properties later, in this case, I'll edit this post. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I updated to tailwind V4 and ran the upgrade utility. In my CSS I have this line:
@config '../../tailwind.config.js';
I expected that the upgrade utility would convert the config file to the css. Did I miss something? Is there a way to do this? did not find anything in the docs about it.
Also the upgrade utility changed my working CSS to somethign not working
original:
what I ended up with:
Beta Was this translation helpful? Give feedback.
All reactions