Django collectstatic not working in production after changing tailwind.config.js

I recently change my local tailwind.config.js to add the breakpoint rules. In local, to apply change i do ./manage.py tailwind start (im using django-tailwind) and then collectstatic and the change is applied. But when i push it to production and do the exact step i can't see the changes happen after i restart the server. When i do the collectstatic it says 1 static files copied to my static files so i think the collectstatic doing just fine but the effect just not there. Also im using AWS EC2 and S3 for my app

I have tried running in incognito mode, changing from Chrome to Firefox, hard refresh my browser, purge my cache in Cloudfare. But i still didnt see the changes.

What can it be? is there an option to force django to refresh staticfiles? I thought restarting the server was enough.

Edit : I noticed something by inspecting the page in local and production, the css file is different. Like there is a class that missing in production like mb-12 mt-12 etc.

I finally get it to work. The problem is i set the expire max in my nginx static file so i guess its make the cache far into the future. After i take it off, build the tailwind, run the collectatic and then restart nginx and guincorn finally it works

Back to Top