2 years ago

Creating different CSS files with Webpack

Posted 2 years ago by Alvaro_Garcia

I would like to use the default app.scss file for the common css needed at all views. And i would like to generate another file with the specific CSS that will be used in a specific view (listing.scss).

I have tried changing the webpack.mix.js file to this: mix.js('resources/assets/js/app.js', 'public/js') .sass('resources/assets/sass/app.scss', 'public/css') .sass('resources/assets/sass/listing.scss', 'public/css/listings');

When I execute npm run dev, I get the following error:

This dependency was not found:

  • F:\PC-1\xamp\htdocs\pruebas\blog\resources\assets\sass\listing.scss in multi ./resources/assets/js/app.js ./resources/assets/sass/app.scss ./resources/assets/sass/listing.scss

To install it, you can run: npm install --save F:\PC-1\xamp\htdocs\pruebas\blog\resources\assets\sass\listing.scss

I haveĀ“nt found information on how to achieve this. Any ideas?

Thanks beforehand.


Please sign in or create an account to participate in this conversation.