Sometimes main.css version is wrong after gulp --production

I may be doing something wrong. Kind of new to sage/gulp, but when i build and send a site to production using gulp, sometimes the main.css version on the live site is wrong. Its like its not updating that part.

Would there be a reason for that? Or an easy way to make sure its updated??

If the file being called is ‘main-ca63712af9.css’ and i look into the simple main.css file, it is correct but that version being called is wrong…


Sounds like a caching issue

Are you using Trellis?

No, havn’t gotten into Trellis yet…would that help or hinder this?

Can you tell that i’m new to sage?? :slightly_smiling:

I am not new to Sage… and I thought I was losing my mind. I am having this issue, too… and only just recently. When I push the update main.css to my live site, it isn’t delivering expected results, with some things being updated and others not.

Though, when I am simply building and running gulp watch locally, all changes take place as expected.

You’ll want to clear the cache after a deploy. Pages that are cached will be referencing assets that no longer exist, resulting in a 404 until the new page is served with the latest built assets.

I’m in the same boat. Locally, it updates fine (obviously not using the dist folder during dev locally).

@ben what cache? browser cache is cleared, even tried in incognito mode…maybe server cache for some reason?

Yes, server cache…

bum bum bum bum… I wonder why this just recently started happening? Not a big deal as it’s an easy fix.

getting the same issue, with the gulp command it renders only main.css which is working fine, late with production command it gives main.css?v1506320180 and in console it says error 404 for main.css. Please help