Level 102
Do you have a scss preprocessor installed ?
npm add -D sass
1 like
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi I'm using newest laravel (with vite auto installed). When running npm run dev everything worked.
But running npm run build / yarn build results in error.
I'm using sass with this setup
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,
}),
],
});
In blade
@vite(['resources/scss/app.sass', 'resources/js/app.js'])
Could not resolve entry module (resources/sass/app.sass).
error during build:
Error: Could not resolve entry module (resources/sass/app.sass).
Very silly mistake.
I have a different folder name "scss' should be "sass". Or same as in my vite config.
Thanks @sinnbeck for helping Sorry for the confussion
Please or to participate in this conversation.