Glutnix
194
2
Mix

Elixir doesn't version Sourcemaps usefully

Posted 3 years ago by Glutnix

It seems that Elixir (I'm using Elixir 4.2.0 in Laravel 5.1 LTE) doesn't properly modify sourcemap files to map a versioned file into the original source file. It does copy the file into the build folder, but something is preventing them from being picked up properly in Chrome. Help?

/* gulpfile.js */
const elixir = require('laravel-elixir');

require('laravel-elixir-vueify');
require('laravel-elixir-phpcs');
require('laravel-elixir-scss-lint');
require('laravel-elixir-eslint');

elixir(function mixer(mix) {
  mix
    .phpcs([
      'app/**/*.php',
    ]);

  mix
    .eslint([
      'gulpfile.js',
      elixir.config.assetsPath + '/' + elixir.config.js.folder + '/**/*.js',
      elixir.config.assetsPath + '/' + elixir.config.js.folder + '/**/*.vue',
    ], {
      configFile: './.eslintrc',
    })
    .browserify('main.js');

  mix
    .scssLint([
      elixir.config.assetsPath + '/' + elixir.config.css.sass.folder + '/**/*.scss',
    ])
    .sass('app.scss');

  mix
    .copy('node_modules/font-awesome/fonts/**', 'public/build/fonts')
    .copy('node_modules/bootstrap-sass/assets/fonts/**', 'public/build/fonts')
    .version(['css/app.css', 'js/main.js']);

});

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.