Skip to content

CSS output differs between development and production builds, breaking custom animation behavior #18645

Closed Answered by yashmodi6
yashmodi6 asked this question in Help
Discussion options

You must be logged in to vote

Thanks for the thorough breakdown — totally agree with everything you said about how Vite’s production pipeline affects animation-* properties through reordering.

Just wanted to add:
I had already tried the longhand approach (splitting animation-name, animation-range-start, etc.), which helped partially, but I was still seeing inconsistent behavior in production — likely due to post-processing interference.

Since I didn’t want to disable minification (keeping bundle size lean is still a priority), the workaround that ended up working for me was:

✅ Moving the fadeIn animation utility into a standalone CSS file that’s not processed by Tailwind/PostCSS — just a regular CSS file imported into…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@yashmodi6
Comment options

Answer selected by yashmodi6
@YakshTechs
Comment options

@yashmodi6
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants