midudev / tailwind-animations

Easy peasy animations for your Tailwind project
https://tailwindcss-animations.vercel.app/
MIT License
513 stars 64 forks source link

Close to working with v4 #63

Open bitofbreeze opened 2 days ago

bitofbreeze commented 2 days ago

v4 recently added support for plugins https://x.com/adamwathan/status/1830715726195306731

But somethings are not quite working with this plugin yet.

The first issue is:

Package subpath './plugin.js' is not defined by "exports" in /node_modules/tailwindcss/package.json imported from /node_modules/@midudev/tailwind-animations/src/index.js

This seems to be because the export from tailwind is:

"./plugin": {
  "require": "./dist/plugin.js",
  "import": "./dist/plugin.mjs"
},

So just removing the ".js" from the import path in this library fixes that.

Then the only other issue I see is the actual animation keyframes style isn't working. Other animation utilities work fine, like duration and timing functions.

image

I think this is very close to supporting v4, would be great to figure out the missing piece for the actual animations.

bitofbreeze commented 2 days ago

Tagging @adamwathan in case you have an idea about why most of this plugin's utilities work except the animation property

philipp-spiess commented 10 hours ago

@bitofbreeze Hey! Thanks for this writeup this is super helpful for us. Just wanted to let you know that we're looking into it.

Regarding the first issue: I think it's reasonable we add exports for the *.js variants as well—We see a lot of plugins using this over the tailwindcss/plugin version.

For the first issue: Have you found anything else missing other than the animation keyframes?