Albert90's avatar

My public/js/app.css contains nothing after "npm run dev" (???)

I have just run into a problem. After compiling my assets with "npm run dev" my javascript directory contains the app.js file and the app.css been created too, but it ends up in public/ccs/app.css as a totally empty file. I am clueless.

0 likes
4 replies
Albert90's avatar

Sorry for the delay, but i had a lot to do lately... So, here it is, please. Maybe You can tell me, whats wrong with it. Thank You!

/*
 |--------------------------------------------------------------------------
 | Mix Asset Management
 |--------------------------------------------------------------------------
 |
 | Mix provides a clean, fluent API for defining some Webpack build steps
 | for your Laravel application. By default, we are compiling the Sass
 | file for the application as well as bundling up all the JS files.
 |
 */

mix.js('resources/assets/js/app.js', 'public/js')
    .sass('resources/assets/sass/app.scss', 'public/css/app.css');

Albert90's avatar
Albert90
OP
Best Answer
Level 6

I have find all the answers i needed at

LaravelNews bootstrap 4 preset

The mistake i made, was the 'composer preset none' command, i used earlier. That caused the empty app.css file.

Please or to participate in this conversation.