Understanding Laravel Mix
This blog has been written with the help of Laravel experts at Obii Kriationz Web LLP - one of the best Web Development Company in Bangalore Let us dive deeper into the concept of Asset from the Laravel perspective:
Assets are client-side elements required to render the application in its intended form on a browser. Assets include CSS, JS, Images or any other element found inside the 'public' directory of a Laravel application.
These elements might depend on modules, libraries, bundles or others. Since the assortment of tech stacks is abundant, it is tough for a developer to keep track of the versions and compatibility to use and render.
How to Install Laravel Mix:
Step 1: Before you try to install Laravel Mix on your environment, makes sure NodeJs and NPM are installed. You can do so by running node -v command on your shell
Step 2: On the shell, run composer create-project laravel/laravel mix --prefer-dist
Step3: Once the package is installed, run npm install
Step 4: To run the Mix
npm run dev --For running all Mix tasks
npm run prd -- For running all Mix tasks and Minify the output.