I've configured Elixir to handle my assets with versioning. I'm not seeing the version generated for CSS files in the /public/build/... directory, but I do see the version for JS being generated (js folder and _all-878a75f6.js file). I'm getting an error when I try to load the page: File css/_all.css not defined in asset manifest. I understand why the error is occuring, I don't understand why the CSS build is not being generated.
Below is my gulpfile.js, my directory structure is the default directory tree and LESS is being compile, the files are combined - but version no working for CSS .. also I'm getting no errors when I run gulp
:
elixir(function(mix) {
mix.less('app.less').styles([
'jquery.validate.css',
'app.css'
], 'public/css/_all.css', 'public/css').version('public/css/_all.css');
mix.coffee().scripts([
'jquery.validate.js',
'app.js',
'utils.js'
], 'public/js/_all.js', 'public/js').version('public/js/_all.js');
});
OK, I think I got it now:
elixir(function(mix) {
// mix.phpUnit();
mix.less('app.less').styles([
'jquery.validate.css',
'app.css'
], 'public/css/_all.css', 'public/css');
mix.coffee().scripts([
'jquery.validate.js',
'app.js',
'utils.js'
], 'public/js/_all.js', 'public/js')
mix.version([
'public/css/_all.css',
'public/js/_all.js'
]);
});
.. I guess I was calling version wrongly, it requires an array to be passed with both JS and CSS files? (rather that two separate calls)
hmm, I have the opposite problem, my app.css file is getting compiled, but I have an error, nothing written to the manifest file, and I dont know why.
Why in your case do you understand why you were getting the error?
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community