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.
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.
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.
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.
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.
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!