2

I'm working on my own differently structured version of Laravel, I've got the PHP end of things working but I'm having a problem with Elixir.

I've seen that supposedly setting elixir.config.assetsDir to a different path should do it but it doesn't seem to work for me? Any thoughts

My assets are in the following file structure

  • support
    • resources
      • assets
        • sass
        • js

And my gulp.js file (still in the project parent folder) looks like so:

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.config.assetsDir = "./support/resources/assets/";

elixir(function(mix) {
    mix.sass('app.scss');
});

Running gulp simply produces

[gulp] Starting 'default'...
[gulp] Starting 'sass'...

Fetching Sass Source Files...
   - resources/assets/sass/app.scss <-- Not Found


Saving To...
   - public/css/app.css

[gulp] Finished 'default' after 460 ms
[gulp] Finished 'sass' after 468 ms

I can fix the issues by giving the full path of app.scss but ultimately I'd rather not as I plan to reuse this framework setup a lot.

1 Answer 1

4

Starting elixir version 3.0, I believe it is now called assetsPath:

elixir.config.assetsPath = './support/resources/assets';
Sign up to request clarification or add additional context in comments.

1 Comment

Thank you! There seems to be very little documentation about it. Or at least difficult to find.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.