{"id":25854,"library":"laravel-elixir-babel","title":"Laravel Elixir Babel","description":"Laravel Elixir extension for transpiling ES6 JavaScript to ES5 using Babel. Version 0.2.0 is the latest stable release, last updated in 2015. This package allows mix.babel() calls in Laravel's Gulpfile to compile ES6 code with optional sourcemaps. It is part of the legacy Laravel Elixir ecosystem (v5/6) and is not compatible with Laravel Mix or modern build workflows. No longer maintained.","status":"deprecated","version":"0.2.0","language":"javascript","source_language":"en","source_url":"https://github.com/rawcreative/laravel-elixir-babel","tags":["javascript","babel","laravel","elixir","laravel-elixir","es6","gulp"],"install":[{"cmd":"npm install laravel-elixir-babel","lang":"bash","label":"npm"},{"cmd":"yarn add laravel-elixir-babel","lang":"bash","label":"yarn"},{"cmd":"pnpm add laravel-elixir-babel","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required peer dependency for mix.babel() API","package":"laravel-elixir","optional":false},{"reason":"Transpilation engine","package":"babel-core","optional":false},{"reason":"Gulp plugin for Babel","package":"gulp-babel","optional":false}],"imports":[{"note":"Must require the package to register mix.babel(). No exported symbol.","wrong":"import elixir from 'laravel-elixir'; // Not supported with gulpfile","symbol":"default","correct":"var elixir = require('laravel-elixir');\nrequire('laravel-elixir-babel');"},{"note":"Only accepts a string path or options object.","wrong":"mix.babel('app.js').scripts() // Not chainable like elixir's default mix methods","symbol":"mix.babel","correct":"mix.babel('app.js')"},{"note":"Single file only; use elixir's scripts() for multiple files.","wrong":"mix.babel(['app.js', 'other.js']) // Array not supported","symbol":"mix.babel (with options)","correct":"mix.babel('app.js', { srcDir: 'resources/js', output: 'public/js', sourceMaps: true })"}],"quickstart":{"code":"var elixir = require('laravel-elixir');\nrequire('laravel-elixir-babel');\n\nelixir(function(mix) {\n    mix.babel('app.js');\n});","lang":"javascript","description":"Install the package, require it in your Gulpfile, and call mix.babel() to transpile ES6 to ES5 using Babel."},"warnings":[{"fix":"Use Laravel Mix with Webpack (laravel-mix) instead, which includes Babel via mix.js().","message":"Package is unmaintained since 2015. Babel has evolved significantly (v6, v7) and this extension does not support modern Babel configurations.","severity":"deprecated","affected_versions":">=0.0.0"},{"fix":"Upgrade to Laravel Mix and use mix.js() for Babel transpilation.","message":"Does not work with Laravel Mix or Laravel 5.4+; only compatible with the old Laravel Elixir (v5/6) and Gulp.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Set sourceMaps: true in options but verify with browser developer tools.","message":"Sourcemaps may not work correctly in all browsers or tools due to outdated gulp-babel integration.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Use elixir.scripts() combined with Babel CLI or switch to Laravel Mix.","message":"Cannot transpile multiple files at once; only a single entry file is supported per call.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Install laravel-elixir: npm install laravel-elixir --save-dev","cause":"Missing required peer dependency laravel-elixir.","error":"Error: Cannot find module 'laravel-elixir'"},{"fix":"Add require('laravel-elixir-babel') after requiring elixir.","cause":"The package require('laravel-elixir-babel') is missing or placed incorrectly.","error":"mix.babel is not a function"},{"fix":"Ensure Babel is configured via .babelrc or use CommonJS require() in Gulpfile.","cause":"ES6 import syntax used inside Gulpfile or source files without Babel configuration.","error":"SyntaxError: Unexpected token import"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}