I honestly dont know if it can handle both types at the same time. But perhaps try naming them different, as the output would be the same file name (both would compile to app.css). So maybe name it app2.scss
Oct 25, 2022
5
Level 3
SCSS not compiling
In my vite.config.js I have
import { defineConfig } from 'vite';
import laravel, { refreshPaths } from 'laravel-vite-plugin';
import basicSsl from '@vitejs/plugin-basic-ssl';
export default defineConfig({
server: {// https://stackoverflow.com/a/73113078/4360876
host: '192.168.56.101',
https: true
},
plugins: [
basicSsl(),
laravel({
input: [
'resources/css/app.css',
'resources/js/app.js',
'resources/sass/app.scss',
],
refresh: [
...refreshPaths,
'app/Http/Livewire/**',
],
}),
],
});
Then I have files:
/resources/css/app.css
/resources/sass/app.scss
In my blade layout file I have:
@vite(['resources/scss/app.scss', 'resources/css/app.css', 'resources/js/app.js'])
My dev server's IP address (which is hosting vite) is 192.168.56.101 (a VM), but I can hit https://192.168.56.101:5173/resources/css/app.css (200 success) but not https://192.168.56.101:5173/resources/scss/app.scss (404 not found).
Does anybody know what might be going on? am I correct in assuming that in my @vite() include I should be including the path to /scss/app.scss AND /css/app.css if I want to use SCSS and CSS?
Please or to participate in this conversation.