I'm having the following 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 Less
| file for our application, as well as publishing vendor resources.
|
*/
var paths = {
'jquery': './vendor/bower_components/jquery/',
'bootstrap': './vendor/bower_components/bootstrap-sass-official/assets/',
'js': './resources/js/'
}
elixir(function (mix) {
mix.sass('app.scss', 'public/css/')
.copy(paths.bootstrap + 'fonts/bootstrap/**', 'public/fonts')
.scripts(
[
paths.jquery + "dist/jquery.js",
paths.bootstrap + "javascripts/bootstrap.js",
paths.js + "app.js"
],
'public/js/app.js', './')
.version(['js/app.js', 'css/app.css']);
mix.copy('public/js/app.js.map', 'public/build/js/app.js.map');
mix.copy('public/css/app.css.map', 'public/build/css/app.css.map');
});
However, the .map-files are not copied to the public/build/ folder. Am I doing something wrong with mix.copy()? How can I see why the files are not copied?
I actually think this is a bug in Laravel Elixir as well, since mix.version() should already copy the .map files already without the need for manual copying.
UPDATE
I filed a issue on Github: github.com/laravel/framework/issues/7650
As @Thomas said, it's fixed now: https://github.com/laravel/elixir/commit/77464c615b0fd2640eedd2954cd9c8cb3dfc6f44
Commit message:
When versioning files, copy over .map files as well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With