You can't do that in a single file. However you should be able to add a mix file to each directory. Note that you would need to set each directory then. By default Laravel mix triggers a set of directories. If you use subdirectories you will have the wrong paths by default.
Basically you get a setup like this
- folder1
- webpack.config.js
- webpack.mix.js
- folder2
- webpack.config.js
- webpack.mix.js
Now the webpack.mix.js is just the regular file you're used to. For the webpack.config.js file you get something like this
module.exports = {
context: __dirname + "/app",
entry: "./app.js",
output: {
filename: "app.js",
path: __dirname + "/dist",
},
}
You have to play around with this a little bit, but this should put you in the right direction!