Copying Files

mix.copy(from, to);

From time to time, you'll want to copy one or more files, as part of your build process. No problem; that's a cinch. Use the mix.copy() method to specify the source file or folder, and then your desired destination.

mix.copy('./node_modules/vendor/acme', './public/js/acme');

Upon compilation, the "acme" directory will be moved to public/js/acme, accordingly. A common use case for this is when you wish to move a set of fonts, installed through NPM, to your public directory.

results matching ""

    No results matching ""