Vue.js webpack : how to get the list of files in a directory?
You can utilize webpack's require.context() to list files in a given directory at compile time.
https://webpack.js.org/guides/dependency-management/
const illustrations = require.context(
'@/assets/illustrations',
true,
/^.*\.jpg$/
)
console.log(illustrations.keys())