Minification is the process of minimizing code and markup in the web pages and script files. It’s one of the most common techniques for reducing website load times and bandwidth utilization. Minification dramatically improves site speed and accessibility, directly translating into a better user experience. It’s also useful for people who are browsing your website using a limited data plan and want to reduce their bandwidth usage while surfing the web.
Installation & Setup
Installing Node & Laravel Mix
node -v && npm -v && npm install
// Run all Mix tasks…
npm run dev
// Run all Mix tasks and minify output…
npm run prod
Mix will display OS alerts when compiling if they are available, giving you fast feedback on whether the compilation was successful or not. There may be times, though, when you might prefer to turn off these notifications. Triggering Mix on your production server is one such example. The
disableNotifications function can be used to turn off notifications.