Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Unable to locate file in Vite manifest: resources/scss/hrms.scss. How to solve this using laravel vite?

I’m using laravel 9 and vite for building scss and js files. After running the npm run build command in production I’m getting the above error. Please help me to solve.

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

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Please add the missing file resources/scss/hrms.scss in vite.config.js like below:

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

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

You can now use this file in the blade as

@vite(['resources/scss/hrms.scss'])
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading