Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

laravel-mix

Package Overview
Dependencies
Maintainers
2
Versions
209
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

laravel-mix

The power of webpack, distilled for the rest of us.

  • 6.0.49
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
241K
increased by6.15%
Maintainers
2
Weekly downloads
 
Created

What is laravel-mix?

Laravel Mix is a wrapper around Webpack that simplifies the process of defining Webpack build steps for your Laravel application. It provides a clean, fluent API for defining basic Webpack build steps for your application, such as compiling Sass, Less, or Stylus, and bundling up your JavaScript files.

What are laravel-mix's main functionalities?

Compiling Sass

This feature allows you to compile Sass files into CSS. The code sample demonstrates how to compile a Sass file located at 'resources/sass/app.scss' and output the resulting CSS to 'public/css'.

const mix = require('laravel-mix');

mix.sass('resources/sass/app.scss', 'public/css');

Bundling JavaScript

This feature allows you to bundle JavaScript files. The code sample shows how to bundle a JavaScript file located at 'resources/js/app.js' and output the resulting bundle to 'public/js'.

const mix = require('laravel-mix');

mix.js('resources/js/app.js', 'public/js');

Versioning Files

This feature allows you to version your compiled files, which is useful for cache busting. The code sample demonstrates how to version the bundled JavaScript file.

const mix = require('laravel-mix');

mix.js('resources/js/app.js', 'public/js')
   .version();

BrowserSync

This feature allows you to automatically refresh your browser when files are changed. The code sample shows how to set up BrowserSync to proxy your local development server.

const mix = require('laravel-mix');

mix.browserSync('my-domain.test');

Copying Files

This feature allows you to copy files or directories from one location to another. The code sample demonstrates how to copy all files from 'resources/images' to 'public/images'.

const mix = require('laravel-mix');

mix.copy('resources/images', 'public/images');

Other packages similar to laravel-mix

Keywords

FAQs

Package last updated on 09 Jun 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc