Processing individual .js files in Elixir using mix.js()
is straightforward and can be done like this:
mix
.js(
"app.js",
{
name: "app",
entryDirectory: "resources/js/",
outputDirectory: outputFolder + "js/"
}
)
.js(
"main-index.js",
{
name: "main-index",
entryDirectory: "resources/js/",
outputDirectory: outputFolder + "js/"
}
)
Therefore, is it possible to process all .js files in a particular directory? I couldn’t find a reference to anything in the docs other than just copying individual files/folders.
I was hoping I could do some type of wildcard processing, but it does not look like this feature is supported (yet):
mix
.js(
"*.js",
{
entryDirectory: "resources/js/",
outputDirectory: outputFolder + "js/"
}
)
Is there another or better way to batch process a series of .js files in Elixir or do they need to be manually specified in webpack.config?