Laravel Mix allows us to work with these technologies and many more in a simple way and with practically no configuration.
To work with this boilerplate, it is necessary to have installed Node.js and NPM You can check if you have npm installed by running this command:
npm -v
Which should return something like 6.14.0
Download the repository and install laravel mix boilerplate using npm
git clone https://github.com/endani/laravel-mix-boilerplate my-project
cd my-project
npm install
That is all. From now on, you can now compile your assets.
Remember that npm install
can take a long time to finish. It is normal, don't worry.
Then you just need to run this command to compile
npm run dev
To have the laravel mix boilerplate automatically compile when you make a change to the SASS, you can run this command:
npm run watch
In the webpack.mix.js
file is the configuration that tells Laravel mix what to compile and where.