I am working on a fresh laravel 5.4 project for the first time. And I am using sass for it. With the default app.scss file I have made some other as well that I am importing in that app.scss file. But when I run the command suggested in the documentation npm run watch
I get an error:
app.scss doesn't export content
This is how the app.scss file looks like:
// Fonts
@import url(https://fonts.googleapis.com/css?family=Raleway:300,400,600);
@import "node_modules/foundation-sites/scss/foundation";
// Variables
@import "variables";
@import "admin";
@include foundation-global-styles;
@include foundation-everything;
@include foundation-flex-classes;
@include foundation-flex-grid;
And I have a default webpack.mix.js
file:
const { mix } = require('laravel-mix');
/*
|--------------------------------------------------------------------------
| 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');
via Leff
No comments:
Post a Comment