SCSS not rebuilding / changes aren't taking

EDIT: Cloudflare was caching stuff.

Hi! I love using Vapid, and have had a very easy time getting it set up on my own hosting. I already have a couple of websites set up using it.

My issue is that I will make changes to my styling in my .scss files, and the changes don’t “take” on my production server. They’ll work just fine locally in development mode, but nothing I’ve been able to do will “update” my built css file in production.

Any thoughts?


I was able to get the change to “take” by adding an additional rule for another class. However, if I was just modifying / adding a rule to an existing class or removing a rule for a class, it didn’t seem to work.

I’m not sure if this is a bug, or if I’m misunderstanding how webpack is set up for Vapid. If this is a bug, I can open an issue on GitHub.

@Gulci It’s hard to know without getting into the details of your server setup, but my first question would be: Are you restarting the Vapid server after deploying? In development mode, the server watches local files for changes, but in production it doesn’t.

@scott My setup is nearly identical to the one broken down here. (PM2, nginx)

I am restarting the vapid server. I’ve tried stopping it, restarting, even stopping it and waiting a few minutes. It seems like I’m only able to trigger a rebuild sporadically.

What happens if you curl the file locally, on the server?

If you’re referring to curling the built css file, same thing, I don’t see my new styles.

Yeah, that’s what I was referring to: curling the file from the Vapid/PM port on localhost vs. the external/Nginx port, just to rule out anything further down the pipe.

Are you able to see other changes that run through Webpack? e.g., Adding a console statement to the JS file?

JS works as expected. I can see any changes to my Javascript immediately upon restarting the vapid server.

EDIT: I lied. I added something and it was reflected immediately, but removing it is where I am now having issues. :confused:

I’m curious to know what happens when you create new files instead of modifying an existing. e.g., Create site2.pack.scss, restart, create site3.pack.scss, restart, etc.

The same things happens when I try that with both Javascript and SCSS. (For example, I created site2.pack.scss and added a dummy rule. I restarted, and the rule was there. When I deleted the file, the rule persisted. When I created a third site3.pack.scss file, nothing changed. The rule from site2.pack.scss persisted.)

I wonder if the way I’ve set it up is keeping this stuff in memory somehow and even if Vapid rebuilds the app, it just keeps serving the old file.

Guess what. It was Cloudflare. :laughing: Thanks for your assistance anyways. Sorry for that! I completely overlooked that I had that on until I realized that Vapid was obviously rebuilding the file when I worked on this sometimes, and then it just magically “stopped” after my first try. Ouch! But I’m glad it was something stupid simple like that.

@Gulci Ah, phew! I was having a hard time thinking of the next steps. Glad to hear it’s resolved.