/* LINK: https://laravel.com/docs/9.x/mix#sass */
mix.sass('resources/sass/app.sass', 'public/css')
.sass('resources/sass/admin.sass', 'public/css/admin');
mix.sass('resources/sass/app.scss', 'public/css');
1 => app.js file in import "../sass/app.scss";
2 => vite.config.js fiel in
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
export default defineConfig({
plugins: [
laravel({
input: [
'resources/sass/app.scss',
'resources/js/app.js',
],
refresh: true,
}),
],
});
3 => npm run dev
To use scss in laravel or any other language, you can create watchers that will autocompile scss to plain css
You can also use VSC with addon like https://marketplace.visualstudio.com/items?itemName=ritwickdey.live-sass