If I use this code in the gulpfile.js: var elixir = require('laravel-elixir');
/* |--------------------------------------------------------------------------
Elixir Asset Management |
---|
Elixir provides a clean, fluent API for defining some basic Gulp tasks |
for your Laravel application. By default, we are compiling the Sass |
file for our application, as well as publishing vendor resources. |
*/ |
elixir(function(mix) { mix.sass(); });
It does not work but if I replace 'sass()' with 'sass(app.scss);', it works fine.
When using the 'gulp' command from the command line I get an error which says 'Cannot read property 'indexOf' of undefined'.
I've tried reinstalling the node JS from my project and still cannot get it to work.
Thanks
Hi Oliversb,
why are you trying to call mix.sass with no parameters?
By default, Elixir, underneath the hood, uses the LibSass library for compilation. If you think the problem is in the libraries you can try: npm rebuild node-sass
yurybs said:
Hi Oliversb,
why are you trying to call mix.sass with no parameters?
By default, Elixir, underneath the hood, uses the LibSass library for compilation. If you think the problem is in the libraries you can try: npm rebuild node-sass
Is there not a command to compile all SASS files? Thanks
Hi Oliversb,
yes, there is:
To compile Sass
elixir(function(mix) { mix.sass("app.scss"); });
This assumes that your Sass files are stored in resources/assets/sass.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community