Created
May 25, 2018 16:00
-
-
Save ibnuh/9aa5805c14add72c510cc4948f4f6a1e to your computer and use it in GitHub Desktop.
Laravel mix wildcard workaround
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let mix = require('laravel-mix'); | |
let fs = require('fs'); | |
// Your bunch of js folders | |
let componentsFolder = 'resources/assets/js/manage/components/'; | |
// Get all js inside the folder | |
let components = fs.readdirSync(componentsFolder); | |
// run laravel mix for each js | |
components.forEach(component => { | |
mix.js(componentsFolder + component, 'public/js/manage/components/' + component); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment