danilchican's avatar

Resources compilation error.

Hi everyone! I just started to use fresh Laravel 8.x with OOTB Mix Asset Management and tailwind.

The problem has been happen when I tried to compile additional .scss resources with sass(). With .css files as I thought no any problems. Error exists in console but .scss will be compiled into css successfully.

My code:

mix
    .js('resources/js/app.js', 'public/js')
    .sass('resources/css/template.scss', 'public/css/template.css') // here
    .postCss('resources/css/app.css', 'public/css', [
        require('postcss-import'),
        require('tailwindcss'),
    ]);

The error:

ERROR in multi ./resources/js/app.js ./resources/css/template.scss ./resources/css/app.css
Module not found: Error: Can't resolve 'd:\mypathhere\resources\css\app.scss' in 'd:\mypathhere'
 @ multi ./resources/js/app.js ./resources/css/template.scss ./resources/css/app.css /js/app[1]

How to fix it? I want to use tailwind and sass(). But it can't work together.

I think the same issue here: https://stackoverflow.com/questions/60696756/tailwind-laravel-mix-module-not-found-error-cant-resolve-scss-file

0 likes
0 replies

Please or to participate in this conversation.