Upgrading from v3 to v4: prefix woes #18176
Replies: 2 comments 1 reply
-
TLDR: I'm having trouble replicating your issue and get different issues altogether. Try running the After cloning and trying to
Removing the Then, running
Breaking each of these errors down:
|
Beta Was this translation helpful? Give feedback.
-
@wongjn Thanks for having a look and sorry for not giving more details. I just created a new clone, and in there
works without failing on tempusdominus. The three invalid css files are outside of the assets directory and not used for tailwindcss. I fixed them so that they do not show up as problems anymore and commit them locally so that I can use the upgrade tool without forcing. Which ran through this time with out the prefix error message. But it also said it can't migrate my js-config file and therefore adds an @config entry. Is there any documentation, what is what now if I would try migrating that manually? But as that didn't fix the prefix issue, I drop the plan to migrate for now. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I want to upgrade my project from v3 to v4. The repo has a rather extensive tailwind.config.js including a prefix setting: prefix: "u-". That prefix is working fine in v3, so my html and css files make use of u- a lot.
Migrating to v4 doesn't work, though.
I tried the following tailwind.css file to start the migration:
That leads to an error message saying (wrongly): "The prefix 'u' is invalid. Prefixes must be lowercase ASCII letters (a-z) only and is written as a variant before all utilities. We have fixed up the prefix for you. Remove the trailing
-
to silence this warning." (the 'u' should be the original 'u-'. After I figured that, I removed the minus sign.Running the migration tool again I get this error instead:
I can change all the u-rounded-8 into u:rounded-8 in the css files, but doing the same in all the html files is not really possible. Especially as the prefix now has to be applied before any modifier while in v3 it was after! E.g. md:u-rounded-8 in v3 would now be u_md_rounded-8.
Any idea how to get this done? I'm using postcss.
Beta Was this translation helpful? Give feedback.
All reactions