Dl

A Laravel Mix extension to download external files.
latest v1.0.0 - released
rias
2 downloads last week
MIT license
1 version
download

NPM NPM NPM

Laravel Mix Download

This extension provides Download support to your Mix (v2.1 and up) builds. This allows you to download external files.

Usage

First, install the extension.

npm install laravel-mix-dl --save-dev

Then, require it within your webpack.mix.js file, like so:

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

require('laravel-mix-dl');

mix
    .js('resources/assets/js/app.js', 'public/js')
    .less('resources/assets/less/app.less', 'public/css')
    .download([
        {
            url: 'https://google-analytics.com/analytics.js',
            filepath: 'js/analytics.js',
        },
    ]);

And you're done! Compile everything down with npm run dev.