To add wildcard mapping in entry of Node Webpack, we use glob
.
For instance, we write
const glob = require("glob");
// ...
module.exports = {
//..
entry: glob.sync("./src/scripts/*.js"),
};
to set entry
to the pattern returned by glob.sync
to add all the paths that match the pattern as entry points.