Learn Laravel Mix
Webpack is the most powerful and flexible asset compilation tool available today. With that power, however, comes a certain level of complexity. That's where Laravel Mix steps in. Intended for the 80% usecase, Mix wraps around webpack to make most commonly desired build tasks a cinch to activate.
In this series, as the maintainer of Laravel Mix, I'll teach you everything you need to know - from the basics, to advanced configuration.
Series episodes
Start Compiling Fast
7m 28sInstall dependencies and compile JavaScript and Sass fast with Laravel Mix, get your assets built quickly and confidently.
Decoding Your NPM Scripts
5m 22sDecode Laravel's NPM scripts (dev, watch, prod) to understand what each command runs and how they trigger your Webpack build.
JavaScript Bundling
12m 46sBundle JavaScript with mix.js(): ES2017 compilation, tree shaking, minification, and practical tips to optimize your builds.
The Ins and Outs of CSS Compilation
12m 25sCompile CSS with Laravel Mix: Sass, Less, Stylus, or PostCSS, learn tooling and workflows to streamline stylesheet builds.
Adding PostCSS Plugins
6m 57sAdd PostCSS plugins with Laravel Mix to layer stylesheet transforms, chain them, optimize CSS, and extend your build workflow.
Automatic Browser Refreshing
3m 23sUse Mix's built-in Browsersync to auto-reload browsers on asset changes, speed up visual feedback and stop manually refreshing during development.
Cache-Busting Assets
4m 51sUse mix.version() to append unique hashes to assets and generate mix-manifest.json, enabling reliable cache-busting for fresh files.
Registering Additional Babel Plugins
3m 16sLearn how to register extra Babel plugins with Laravel Mix, extending preset-env for custom transforms in your build.
Async/Await Support Out of the Box
7m 9sLaravel Mix 1.7+ adds async/await support, simplifying promise-based workflows for clearer, more synchronous-style build scripts.
Mix Extension Essentials
7m 36sLearn how to create custom Laravel Mix extensions using its API. Discover two simple ways to extend Mix and enhance your build process with ease.
Build and Deploy a Mix Extension in 15 Minutes
14m 34sBuild and publish a real Laravel Mix extension via npm in 15 minutes - hands-on guide to creating, packaging, and deploying it.




