This is my gulpfile.js
var elixir = require('laravel-elixir');
elixir(function(mix) {
mix.less([
'style.less'
], 'public/css/style.css')
.styles([
'reset.css',
'font-awesome.min.css',
'style.css'
], 'public/css/app.css', 'public/css')
.scripts(['jquery-1.12.0.min.js', 'main.js'], 'public/js/app.js', 'resources/assets/scripts')
.version(['css/app.css', 'js/app.js']);
});
As result I get files
public/build/app-2a14246111.css
public/build/app-7790e07dfb.js
public/build/rev-manifest.json
but when I try to add css and js files to layout
<link rel="stylesheet" href="{{ elixir("css/app.css") }}">
<script src="{{ elixir("js/app.js") }}"></script>
I get
<link rel="stylesheet" href="/build/css/app-2a14246111.css">
<script src="/build/js/app-7790e07dfb.js"></script>
and browser can't find them because it tries to find
http://localhost:8080/build/css/app-2a14246111.css
http://localhost:8080/build/js/app-7790e07dfb.js
and project folder name and public folder are missed somehow in paths. How to fix it?
Actually I see, I can add dot in paths like
<link rel="stylesheet" href=".{{ elixir("css/app.css") }}">
<script src=".{{ elixir("js/app.js") }}"></script>
and then all will work, but I don't like this kind of fix.