I'm using whitenoise and ran into the following error when bumping django-allauth-ui:
whitenoise.storage.MissingFileError: The file 'allauth_ui/tailwindcss' could not be found ...
The root cause is the switch from Tailwind v3 to Tailwind v4. The source file allauth_ui/input.css changed from:
@tailwind base;
@tailwind components;
@tailwind utilities;
to:
@import "tailwindcss";
@plugin "daisyui" { themes: all; }
During collectstatic, WhiteNoise's CompressedManifestStaticFilesStorage post-processes every CSS file and tries to resolve @import targets to real static files. It resolved tailwindcss to allauth_ui/tailwindcss, which doesn't exist.
The actually-served stylesheet is the compiled output.css, input.css is just a build source that isn't referenced by any template.
For now I fixed in my project by subclassing CompressedManifestStaticFilesStorage and ignore allauth_ui/input.css.
A proper fix here would be to move the source out of allauth_ui/static/ into a non-collected directory, for example static_src/
I'm using whitenoise and ran into the following error when bumping django-allauth-ui:
The root cause is the switch from Tailwind v3 to Tailwind v4. The source file
allauth_ui/input.csschanged from:to:
During collectstatic, WhiteNoise's
CompressedManifestStaticFilesStoragepost-processes every CSS file and tries to resolve @import targets to real static files. It resolved tailwindcss toallauth_ui/tailwindcss, which doesn't exist.The actually-served stylesheet is the compiled
output.css,input.cssis just a build source that isn't referenced by any template.For now I fixed in my project by subclassing
CompressedManifestStaticFilesStorageand ignoreallauth_ui/input.css.A proper fix here would be to move the source out of
allauth_ui/static/into a non-collected directory, for examplestatic_src/