A FIELD GUIDE TO LARAVEL · VOLUME II · THE ECOSYSTEM
ENTRY II.6 · ASSET PIPELINE
Elixir
Package · first recorded 13 October 2014, first npm release; Laravel 5's default in 2015
A fluent wrapper over Gulp for compiling Sass, Less and ES2015 into public/, with hashed filenames for cache busting. Archived in March 2020; its line continued in Laravel Mix and then the Vite plugin.
Specification
Kind npm package driven by a gulpfile.js; archived 31 March 2020
Engine Gulp, with webpack or Rollup for ES2015 modules
Runs on Node and a global gulp-cli, on the developer's machine
Installed by npm install (laravel-elixir sat in the default package.json)
Voice none in artisan. gulp · gulp --production · gulp watch
Scales by n/a: a build step, not a runtime. Chained tasks in one file
Range Cloud: n/a: predates Cloud, whose build commands run Vite now
Forge, VPS: ran once in the deploy script; Vite now
Vapor: n/a: Vapor builds assets and uploads them to CloudFront; Vite now
Neighbours
Mix is the direct successor: the same chained calls, written over webpack instead of Gulp. The Vite plugin is what a new Laravel app ships with now, @vite in Blade where elixir() once stood. Elixir's role passed to each in turn; the job, versioned assets in public/, stayed the same.
Field marks
gulpfile.js with elixir()
laravel-elixir in package.json
elixir('css/all.css') in Blade
resources/assets/sass/app.scss
Fig. II.6.1 · Source to public, exploded
Parts
1 gulpfile.js, at the project root, holding one elixir() call whose chained methods define the whole pipeline.
2 Sass. mix.sass('app.scss') reads resources/assets/sass and writes public/css/app.css.
3 Webpack. mix.webpack('app.js') bundles ES2015 from resources/assets/js into public/js; Rollup was the alternative.
4 Gulp. gulp runs every task once; --production minifies; gulp watch recompiles whenever a source changes.
5 Version. mix.version('css/all.css') appends a hash, all-16d570a7.css, so browsers cannot serve a stale copy.
6 public/. The output directory. Blade's elixir('css/all.css') helper resolves the current hashed filename.
Hidden joinery
Source maps were on by default, a .map beside every output; elixir.config.sourcemaps = false stopped them. mix.combine() skipped minification and maps for pre-minified vendor files, cutting compile time. A webpack.config.js at the root was folded into the build. Windows hosts could need npm install --no-bin-links.
Checked line by line against laravel.com/docs/5.3/elixir, GitHub and npm on 2026-10-08.
TITLE
Elixir · source to public
SOURCES
laravel.com/docs/5.3/elixir · github.com/laravel/elixir · www.npmjs.com/package/laravel-elixir · github.com/laravel/laravel/blob/v5.0.0/package.json · laravel.com/docs/5.4/mix · laravel.com/docs/13.x/vite · laravel.com/cloud/docs/environments · docs.vapor.build
STATUS
Verified · 2026-10-08
SHEET
II.6 of 48
REV
A · 2026-10-08
DRAWN
BS
FINISH
All faces, including the back