OneBite.Dev - Coding blog in a bite size

How to solve Unable to locate file in Vite manifest app sass at deploy

I got an error that says Unable to locate file in Vite manifest: resources/sass/app.sass when deploying my laravel app - here is how I solve it

When deploying my laravel site that use Vite and sass (CSS-preprocessor), I got this error ” Unable to locate file in Vite manifest: resources/sass/app.sass”

Turns out, I need to update the vite config file

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

export default defineConfig({
    plugins: [
        laravel({
            input: [
                'resources/sass/app.sass', 
                'resources/js/app.js',
            ],
            refresh: true,
        }),
    ],
});

To that. or whatever the name of your sass file is

laravel vite