The code below assumes you have the following file structure (if not, you should should adjust the code to suit) - build/ Next, using the your editor, IDE or the command line, create a new file called in the root of your projects SCSS and JS file setup This will take a few minutes to install as it has several dependencies to install itself. This can be done by entering the following command: npm install laravel-mix -save This will run you through some questions and set up a package.json file for you. If you are unsure whether this is required, look for a package.json file in your folder. If you haven't done so already, run the following on the command line (make sure you have cdd to the correct directory). Include the image optimisation config to your fileĪs with any 'cool' tech these days, we need to start with npm.Check your compiled assets exist, and include them in your template ( ).Add the NPM scripts to your package.json file.Add the sass and js compilation to the file.Install laravel-mix: npm install laravel-mix -save.Ensure you have a package.json file ( npm init if not).Just want to copy and paste? In a rush and just need the bullet points? Copy and optimise images while making.It is USEFUL if you are familiar with using these tools. This blog post uses the command line to install tools via npm, along with using SCSS.