SquareStar's avatar

Vite loads different versions of style depending on file saved

I'm fairly new to Laravel, having recently completed an online course. I just set up a project and have SASS compiling running via npm run dev.

When I save an SCSS file everything works as expected. However when I save a blade template, the page reloads with a cached version of the CSS.

My vite call looks like this: @vite(['resources/scss/app.scss'])

I notice that in the inspector the difference between the two files being loaded is that, when the correct styles are displayed, the loaded file has a query parameter: [::1]:5173/resources/scss/app.scss?t=1705145334900 whereas after saving a blade file, that t parameter is not there.

What am I doing wrong?

Thanks!

0 likes
0 replies

Please or to participate in this conversation.