Run Time 7:28Free
Run Time 5:22
Out of the box, you'll notice that Laravel includes a number of helpful NPM scripts for triggering webpack. To start, the most relevant ones are
prod. In this lesson, we'll decode these commands to ensure that you fully understand exactly what you're triggering.
Run Time 12:46
Run Time 12:25
Run Time 6:57
PostCSS may be used standalone, or even as a secondary step after your core Sass/Less compilation. Either way, the end result will be the same. Think of PostCSS plugins as layers of an onion, so to speak. Each layer has the chance to operate upon your stylesheet, and modify it in some way. Once complete, those styles are then passed on to the next layer of the onion. Let's review this workflow, when using Laravel Mix.
Run Time 3:23
Mix provides out-of-the-box support for Browsersync, which allows us to detect and refresh the browser each time a relevant asset of yours has changed. No longer will you have to manually refresh the browser over and over to review small, visual tweaks.
Run Time 4:51
The `mix.version()` call will append a unique hash to each file within your generated `mix-manifest.json` file. This can be used to instruct your server when to "bust the cache," and fetch a new copy of the related asset.
Run Time 3:16
Behind the scenes, Laravel Mix leverages Babel's env preset, when transforming your code. However, from time to time, you may need to register additional plugins. Let's review exactly how to do so in this episode.
Run Time 7:09
Laravel Mix 1.7 and higher ships with async/await support out of the box. These two keywords simplify the process of working with promises in a more synchronous fashion.
Run Time 7:36Free
Laravel Mix 2.1 and up includes support for custom user extensions. In fact, the very components that Mix uses behind the scenes are constructed in the exact same way. In this episode, we'll learn the basics of the API. You'll see that there are two ways, based on the complexity of your new component, to extend Mix.
Run Time 14:34
Now that you understand the basic API for constructing Mix extensions, let's build and deploy a real-life extension through npm together...in fifteen minutes!