Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

booni3's avatar

Vite CSS file not found in production - Cached Manifest?

I have just started using Vite on a recent project. I am building the CSS files locally and pushing them to git. Envoyer is just deploying all files and not building anything.

Everything works fine locally and my first production deployment worked also.

Subsequent production deployments through Envoyer are failing to find my CSS file, with a 404 error.

I checked the production deployed manifest file and CSS files and they all match up, however my app is looking for an old CSS file that was previously deployed.

I have tried all the cache:clear config:clear view:clear commands but nothing is working.

Production Manifest:

{
  "resources/js/app.js": {
    "file": "assets/app.ab93cf8a.js",
    "src": "resources/js/app.js",
    "isEntry": true
  },
  "resources/css/app.css": {
    "file": "assets/app.1ec01807.css",
    "src": "resources/css/app.css",
    "isEntry": true
  }
}

File being looked for by production app:

https://...URL.../build/assets/app.6f1520e8.css
0 likes
10 replies
Sinnbeck's avatar

Show how you are adding it in your blade code along with your vite config

booni3's avatar

@Sinnbeck

I have not updated anything from the fresh L9 install.

So blade:

@vite(['resources/css/app.css', 'resources/js/app.js'])

Vite Config:

import { defineConfig } from 'vite';
import laravel, { refreshPaths } from 'laravel-vite-plugin';

export default defineConfig({
    plugins: [
        laravel({
            input: [
                'resources/css/app.css',
                'resources/js/app.js',
            ],
            refresh: [
                ...refreshPaths,
                'app/Http/Livewire/**',
            ],
        }),
    ],
});
booni3's avatar

@Sinnbeck Yes sorry.

At the moment it works if I set my production ENV to local... but as soon as I switch it back to production the manifest does not seem to be read.

booni3's avatar

@Sinnbeck

Yes sorry I am. I just found that other site too. Assumed it was the same but maybe not. I have read the officail docs too (updated my original message)

troygilbert's avatar

I'm encountering the same issue. @booni3 Did you ever determine the cause and/or fix? I'm also using Inertia, wondering if that's a factor?

booni3's avatar

@troygilbert my issue was a php version mismatch when deploying through envoyer.

Forge default php version and the selected version in envoyer were different.

Please or to participate in this conversation.