What is Mix?
In an effort to flatten that curve, Mix is a thin layer on top of webpack for the rest of us. It exposes a simple, fluent API for dynamically constructing your webpack configuration.
npm install laravel-mix --save-dev
...and define your build within a
webpack.mix.js file in your project root.
mix.js('src/app.js', 'dist') .sass('src/styles.scss', 'dist');
That's it! Mix will read this file and construct the necessary webpack configuration for the build.
The only remaining step is to compile your code and get to work.